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


 

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

In this tutorial, you will learn about the <!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:

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

Ads