Home Tutorial Html Html5 HTML5 Examples, Definition of <!DOCTYPE > in HTML5.

 
 

Share on Google+Share on Google+
HTML5 Examples, Definition of <!DOCTYPE > in HTML5.
Posted on: August 26, 2010 at 12:00 AM
Advertisement
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:

Code:

DOCTYPE.html

<!DOCTYPE html>
<html>
<head>
<title>Insert title of document</title>
</head>
<body>
<b>
Workspace for user. 
Write the content of html document............
</b>
</body>
</html>
Output:

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

Advertisement

Related Tags for HTML5 Examples, Definition of <!DOCTYPE > in HTML5.:


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.

Posted on: August 26, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com