2006-04-15

Itty bitty HTML

It's weird looking and it doesn't work properly in any major web browser, but it's perfectly valid by the rules of HTML and SGML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"><title/WTF/<p>OMG

The above takes advantage of the fact that the HTML specification allows you to omit the html start and end tags, head start and end tags, and body start and end tags, and it also makes use of Null End Tags (NET) which is a shorthand form in SGML where you can write <title/Blah blah/ instead of <title>Blah blah</title>. However, no major browser currently supports null end tags (if they did, so-called "XHTML" pages that are viewable in Internet Explorer would suddenly become messed up in your browser).

I should point out that using HTML's shorthand features is generally considered bad practice, since we should be preparing ourselves for an eventual transition to XHTML, which doesn't support those features.

0 comments

Post new comment

Comment moderation policy: Your comment will be reviewed before it is added to the site. This is in response to spam and other forms of abuse. I gladly accept comments containing criticism as long as the language is clean.

This weblog is powered by Blogger.