html5 Site Icon CSS3 Site Icon CSS Site Icon

HTML4 Reference

HTML <html> tag


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


<html  xmlns="">
Everything goes between the start and end HTML tags. 

  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.
A Title which will appear in the Windows title bar.

The content of the web page appears in the body section.

We complete the HTML file with the closing HTML tag.

Required Attributes

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

<html  xmlns=""></html>

Optional Attributes


Common Attributes


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


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

go to home page Homepage go to top of page Top