HTML5 / New DOCTYPE

Posted by Alex on December 21, 2010 in Web Development

HTML5 Doctype

For those wondering what is all the buzz related to that new version of HTML and why it is important, there is one main reason to point out. HTML5 is the “correct” way. It is the way HTML should have started in the first place.

If you are used to code (as expected) in HTML 4.01 or XHTML 1.0 Transitional, you will start noticing the difference right from the 1st line of code.

<!DOCTYPE HTML>

Important Facts

The most important fact about it is that the <!DOCTYPE> declaration must be the very first thing in your HTML5 document, before the <html> tag. This tag tells the browser which HTML specification the document uses. Also, it is very important to understand that the doctype declaration is not an HTML tag;  it should not be included in the <html> tag.

Also, its important to know that the <!DOCTYPE> tag does NOT have an end tag. There is no closing tag, as its only purpose is to instruct the web browser about what version of the markup language the page is written in.

Search

KaoZ Magazine Latest!

Blogroll