Forum Moderators: mack
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
I don't understand the results. For example, on some pages (not all), text is now centered, rather than left-justified (this only occurs in Explorer—not Netscape Navigator or Firefox). On other pages, cell margins and/or padding have changed. Sometimes the vertical alignment of text within cells has changed.
This is my first website--it consists of basic HTML tables linked to a CSS that specifies font characteristics (headings, hyperlinks, several “class” definitions, lists, etc).
Should I be using a different doctype? Is there something in my code that could cause this—if so, where should I look? Unfortunately, I can’t simply show you the site because I haven’t yet published it.
I would appreciate any suggestions/words of wisdom.
Thanks,
Bridget
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> ****
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" href="stylesheet1.css" type="text/css" media="screen" />
I tried using the "strict" doctype and I also copied your charset over the "Windows 1250" in my file. Unfortunately, neither made any difference.
Having looked at things more closely, it seems that my problem only occurs with Explorer, so I'll try search this site for info re doctype and Explorer.
Bridget
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> The above doctype (without the URL) will allow you to validate your pages to pick up errors without switching the rendering mode. For more information, see Quirks Mode vs. Standards Mode [webmasterworld.com]. Using Standards Mode is ideal in the longer term, but it is best to stick with quirks mode for existing pages that you are tidying up - you can switch later to the full doctype in your initial post.
Note that you should be careful with switching the charset, and you should not use trailing slashes as indicated in the message above for your meta elements.
You can validate your pages with the HTML validator [validator.w3.org]. :)
Added: Another thread you might find useful: Meta tags and more - from <head> to </head> [webmasterworld.com]