Share on Google+Share on Google+

HTML5 Examples, Definition of <!DOCTYPE > in HTML5.

In this tutorial, you will learn about the <!DOCTYPE > in HTML5.

HTML5 Examples, Definition of <!DOCTYPE > in HTML5.

In this tutorial, we will introduce you the DOCTYPE of HTML5. DOCTYPE stands for document type declaration. It is an instruction not a tag that informs the web browser about the version of the page in which it is written. It is essential information for rendering the program as after recognizing the version, the web browser behaves in the same manner.

Each HTML document must be start with DOCTYPE even before defining the <html> tag. <!Doctype > is a singular tag.

Declaration Syntax :

Declaration syntax of DOCTYPE in HTML5.

                            <!DOCTYPE  HTML>

The declaration of DOCTYPE is case_ insensitive.

Example of <!DOCTYPE> in HTML5:



<!DOCTYPE html>
<title>Insert title of document</title>
Workspace for user. 
Write the content of html document............

Difference Between HTML5 and HTML4.01:

DTD does not required by the doctype in HTML5. Because SGML( Standard Generalized Markup language) does not support HTML5. But in html4.01 DTD is compulsory. Because HTML4.01 is based on SGML.

HTML5 have only one type of DOCTYPE. But in HTML4.01 have three different type of DOCTYPE.

Download this code



Posted on: August 26, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.


Advertisement null