HTML Element
The HTML element is the parent element for all other elements in a web page and is what identifies the page as HTML. It is a required element that all pages must have.
The only two children it can have are the head and body elements, which it must contain both of to be a valid page.
The only attribute that HTML contains is the xmlns attribute, which is only required for XHTML, and is invalid for HTML. It’s value must always be “http://www.w3.org/1999/xhtml”, without exception.
Note: The DOCTYPE is the only thing on a web page that is not contained within the HTML element. The DOCTYPE must come before the HTML element.
The HTML element requires an opening an closing tag. It’s tag is .
Here is how it should appear for HTML 4.01 Strict:
HTML Code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Page title</title>
</head>
<body>
</body>
</html>
For XHTML 1.0 Strict, it is the same, except it contains the xmlns attribute:
HTML Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Page title</title>
</head>
<body>
</body>
</html>




