Hey everyone, just want a confirmation more than anything or should I say, the professionals view / opinion on this matter.
I know / understand that whitespace that you create within your HTML document doesn't affect anything related to the results on the Web browser application or anything else, tabs, line breaks and so on -- all mainly for readability of the source.
However, one thing that I'm troubled with is the inconsistency among Websites using the HTML 4.01 DOCTYPES.
According to the following Websites:
- http://www.w3.org/TR/html401/struct/global.html#h-7.2
- http://www.javascriptkit.com/howto/doctype.shtml
- http://www.w3.org/QA/2002/04/valid-dtd-list.html
- http://www.w3schools.com/tags/tag_DOCTYPE.asp
- http://www.alistapart.com/articles/doctype/
- http://en.wikipedia.org/wiki/Document_Type_Declaration
And I assume many more, but I can't be bothered searching. That's enough proof. Anyway, according to them Websites the HTML 4.01 DOCTYPES should be served like so:
Code HTML4Strict:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Or something along those lines.
Yet, since I have been creating Web pages I have always used the following format:
Code HTML4Strict:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
And here's a small list of Websites that use this format for serving their DOCTYPES too:
- http://www.msn.co.uk
- http://www.adobe.com
- http://www.youtube.com
- http://www.southampton.ac.uk
- http://www.dell.co.uk
- http://www.w3.org
Yes..Including W3.org. I've provided six trustworthy sources that say one thing but six other Websites that do one straight line, bear in mind these aren't Websites created by silly-billies.
Who's in the wrong? Is the actual Web standard to go off what the W3C Technical Recommendations say word by word, line by line? Or should we have the DOCTYPE on one straight line?
I'm not on any side here. I'm simply asking for clarification on what -the- Web standard is for serving the HTML 4.01 DOCTYPE. I'm more than happy to change the the two line method or stick with the one line method. I've only been serving it as one line because thats what I've seen many other Websites do and its how Adobe Dreamweaver CS3 implements it.
So, two-line method or one-line method?
Thanks,
Andrew Cooper







Bookmarks