Welcome to WebmasterWorld Guest from 188.8.131.52
Forum Moderators: incrediBILL
My site is made out of tables (for now) and it's all one big table with small tables inside, now I have a div align="Center" to center it in the page... but this makes all the text go to the center...
When I have no doctype it's fine, but when I put in a doctype it has this error. How could you fix that?
I am trying html strict (as I was told would be a good choice)
It is a good choice eventually, but your layout as you describe it sound much more suited to a Transitional doctype. The "Strict" version of HTML does not include various presentational elements of HTML which have been superceded by CSS. If you are attempting to validate an existing "tag soup" document, best to go for the easier Transitional first, then once everything validates, you can start to look at replacing some of your presentational HTML with CSS rules.
OK, here's the doctype I would strongly recommend to start with:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
If, and only if, the above doctype seriously breaks things, then you can use the following half-doctype:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
But only use the half-doctype until you have fixed the validation errors - after that, swap back to the long version and adjust the layout as required.
<div align="Center"> is not valid.
<div align="center"> is valid.
If you are going to validate 'strict'. You must lose the capital letters.
The capitalization matters when you use XHTML rather than HTML, not Strict rather than Transitional. In the long-term, it is best to use lower-case only in the tags, but it is not a priority.
and now ALL letters in commands like font FF0000 will be ff0000? right?
Don't bother changing the font tags yet - leave the colors with capitals. Once you can validate the page, one of the next steps is to remove all the font tags and replace them with much the simpler CSS rules.
The above should read:
Once you've done that, put the page through the validator [validator.w3.org] and get your list of errors. Start from the top, and often you'll find that later errors are fixed when you correct the earlier ones.
Also, make sure you are defining the language of the document. On the opening <html> tag, make it <html lang="en"> (replace the "en" with the appropriate language code if you are not writing in English - "fr" for French, "de" for German, etc.)
Finally, make sure you define a character encoding for the page. The easiest way is with a meta tag. Try:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
If you are not using a western-European language, then you will need to replace ISO-8859-1 with a more appropriate charset.
Hope that helps a bit.
Why even have a doctype and "proper" code if it all shows up correctly, or do some browsers need this information inorder to work properly.
Also I see you all like to use CSS, where can I find a page with a list of all the available commands. I use minor ones such as the TD color and that, and the font and link colors, but what else is there?
You can control almost any visual aspect of an HTML element using CSS. The w3.org site has the full list (bit heavy reading though). Look for CSS 2 I think.