HTML and CSS Reference
In-Depth Information
The new, and improved, HTML5 doctype
Okay, get ready for it. Here's the HTML5 doctype:
<!doctype html>
How close was your answer in the Sharpen Your Pencil? This is much simpler,
wouldn't you say? And, wow, you might even be able to remember it without
having to look it up everytime you need a doctype.
Wait, isn't this supposed to tell
the browser the version? Where's the
version number? Is that a typo?
Good point. No, it's not a typo, and let's step through why: you
know the doctype used to be a complicated mess full of version
numbers and ugly syntax. But with the arrival of HTML5, the
doctype was simplified so that now all we have to do is tell the
browser we're using “html”; no more worrying about specific
version numbers or languages or pointing to a standard.
How can that be? How can we just specify “html” without the rest?
Doesn't the browser need that other information? Well, as it turns
out, when the browser sees:
<!doctype html>
it assumes you're using standard HTML. No more getting all hung
up on version numbers or where the standard is located; in fact, the
HTML standard has become a “living standard,” meaning that
it will continue to grow and morph as needed, but without fixed
version numbers. Now, you're probably thinking, “What exactly
does a living standard mean? How is that going to work?” You'll see,
on the next page…
Search WWH ::

Custom Search