Showing posts with label WWW. Show all posts
Showing posts with label WWW. Show all posts

Thursday, August 11, 2011

HTML5 Tutorial 4: doctype Declaration

<!doctype>

The <!DOCTYPE> declaration must be the very first thing in your HTML5 document, before the <html> tag.
The doctype declaration is not an HTML tag; it is an instruction to the web browser about what version of the markup language the page is written in.

It is important that you specify the doctype in all HTML documents, so that the browser knows what type of document to expect.

The doctype in HTML 4.01 required a reference to a DTD, because HTML 4.01 was based on SGML. HTML5 is not based on SGML, and does not require a reference to a DTD, but need the doctype for browsers to behave as they should.

Using the tag:
The !doctype declaration in HTML5 has been simplified, all you do is place <!doctype html> as the very first line of your document before your <html> declaration like so:
<!doctype html>
<html>
</html>
And you're done!

Catch you guys later.