Wot no head (tag)?
I’ve been building websites for over 6 and a half years – three and a half of that spent doing it as a job. And yet in that time I never knew that one of the basic tags that appears in every piece of HTML I’ve ever written, is optional.
It’s there in the spec. The
HTML – the outer wrapper for any web page doesn’t have to be there at all. Nor does the
HEAD tag nor the
Of course most people use them without thinking – everyone else does, and when people learn HTML, you tend to follow the crowd and do as they do. Books tell you to use them. Your friends tell you to use them. Even the evil Frontpage uses them. And yet we didn’t actually have to.
Of course I’ll keep on using all three tags – not out of habbit, but
because when structuring a page, they make sense.
HEAD tag contains everything nicely that’s non-viewable content (metadata etc) and the
BODY should be everything the user sees.
It makes structural sense, but how many people doe things because of logic? If they did we wouldn’t have so many ‘Best Viewed in Internet Explorer’ sites out there. Nope. Most people use the tags because everyone else does.
At least this is one instance of being a sheep and following the crowd, does make sense – even if done for the wrong reasons.