html5 Site Icon CSS3 Site Icon CSS Site Icon

HTML4 Reference

HTML <html> tag

Definition

The <html> tag denotes the start and end of a HTML document and is the document root element of a HTML document.

Example


<html  xmlns="http://www.w3.org/1999/xhtml">
Everything goes between the start and end HTML tags. 

<head>
  The header contains meta information pertaining to the HTML document as well 
  as a mandatory title tag. External files such as CSS stylesheets and JavaScript
  files are also imported in the header section of our HTML file.
<title>
A Title which will appear in the Windows title bar.
</title>
</head>

<body>
The content of the web page appears in the body section.
</body>

We complete the HTML file with the closing HTML tag.
</html>

Required Attributes

xmlns - this attribute is used to define the XML namespace and is always the value as shown above.


<html  xmlns="http://www.w3.org/1999/xhtml"></html>

Optional Attributes

NONE

Common Attributes

NONE

Language Attributes

dir - specifies the directional flow of the content.


<html dir="ltr"></html>   <!-- The text will flow from left to right -->
<html dir="rtl"></html>   <!-- The text will flow from right to left -->

lang - specifies a language code for the content of the element.


<html lang="en">Some text here</html>

xml:lang - specifies a language code for the content of the element in XHTML documents.


<html xml:lang="fr">Some text here</html>

Event Attributes

NONE



<hr /> tag    << Prev          Next >>  <i> tag

go to home page Homepage go to top of page Top