Logic’s Last Stand

June 5, 2008

Doctype Decoration

Filed under: Computers — Tags: , , , , , — Zurahn @ 6:40 pm

If you look at the source code a web page, you’ll see this at the top of almost every page. What does it mean, and why it is there? Apparently you aren’t alone in your confusion. A simple validation will yield ugly results.

XHTML is an HTML coding standard that sets rules for the otherwise extremely loosely typed HTML mark-up language. It helps with browser standards, something most web developers should be very familiar with. It’s getting rather ubiquitous, particularly XHTML transitional, but it’s not much good when you’re using a Doctype Decoration.

A Doctype Decoration is what I call an XHTML doctype declaration on a page that fails, particularly miserably. Just putting it there doesn’t magically make the page better — the whole point is to tell a validator what to validate. If you’re not going to bother with whether it validates or not, it has no point.

This page is not Valid XHTML 1.0 Transitional!
Result: Failed validation, 1374 Errors
Address: http://gamespot.com

This page is not Valid XHTML 1.0 Transitional!
Result: Failed validation, 100 Errors
Address: http://arstechnica.com/index.ars

This page is not Valid XHTML 1.0 Transitional!
Result: Failed validation, 139 Errors
Address: http://digg.com

This is pathetic.

Let’s give the browser sites a run:

This Page Is Valid XHTML 1.0 Strict!
Result: Passed validation
Address: http://www.opera.com

This Page Is Valid HTML 4.01 Strict!
Result: Passed validation, 1 warning(s)
Address: http://mozilla.org

This Page Is Valid HTML 4.01 Strict!
Result: Passed validation
Address: http://webkit.org

This page is not Valid XHTML 1.0 Transitional!
Result: Failed validation, 183 Errors
Address: http://www.microsoft.com/en/us/default.aspx

I guess that explains the state of browser standards pretty well, now doesn’t it?

Advertisements

3 Comments »

  1. Are you the only one that bothers following this strict coding thing, or why does nobody else care?

    Comment by Yaryarbinks — June 6, 2008 @ 4:09 pm

  2. It isn’t that they aren’t coding to the standard, it’s that they include the doctype declaration as though it’s up to the standard, then fail if you test it. It’s halfway inbetween of, I know I should be, but I’m not going to.

    Comment by zurahn — June 6, 2008 @ 7:07 pm

  3. […] Doctype <b>Decoration</b> A Doctype <b>Decoration</b> is what I call an XHTML doctype declaration on a page that fails, particularly miserably. Just putting it there doesnt magically make the page better the whole point is to tell a validator what to validate. <b>…</b> […]

    Pingback by DusktoDawn » Doctype <b>Decoration</b> — June 9, 2008 @ 8:00 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: