Page is a not externally linkable
- Code, Content, and Presentation
-- HTML
---- Why most of us should NOT use XHTML


Wlauzon - 8:39 am on Apr 3, 2006 (gmt 0)


Source code from w3.org:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head profile="http://www.w3.org/2000/08/w3c-synd/#">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Hmmm... The W3C uses XHTML Strict with content="text/html".

Sounds fishy.

Fishy, yes, buggy yes.

Since this thread started, I have been checking a little deeper into the issue, especially vs IE6.

And I found a very interesting thing.

This line "<?xml version="1.0" encoding="utf-8"?>" causes IE6 to go into "weird quirks" mode with CSS, especially lists.

What was happening was that I had a small nav list that totally refused to go flush left no matter what I did - worked fine in other browsers. It had a left margin of around 10% - and I spent about 3 hours trying to find some odd inheritance or unclosed tag someplace. Then just by chance I tried a different DOCTYPE, and left that line out.

Lo and behold - that fixed the problem with that table lining up like it was supposed to.

So even though I came in here as a non-believer, I have seen the light, and have now changed all our pages over to the standard 4.01 strict DOCTYPE.

I also found out that using UTF-8 can cause some odd behaviour - so far have seen nothing serious, but I might end up replacing that also with the standard ISO.

<bows down to Doc's infinite wisdom>


Thread source:: http://www.webmasterworld.com/html/12026.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com