HTML <html> tag

The <html> tag signifies the beginning of an HTML document. It is the root element (main tag) of an HTML document in which all the other tags for an HTML document are enclosed.

NOTE: The <!DOCTYPE> declaration is the only thing in an HTML document that comes before the <html> tag. The <!DOCTYPE> declaration MUST be the very first tag in an HTML document.

Attributes

Attribute Description Possible values
xmlns should be used with XHTML documents, it will specify the namespace to use "http://www.w3.org/1999/xhtml"

NOTE: The namespace at "http://www.w3.org/1999/xhtml" is used by XHTML documents by default and adding the xmlns attribute to the <html> tag is optional.

NOTE: If you're going to use the xmlns attribute, use it only in XHTML documents, it is invalid in HTML documents.

Standard attributes

dir, lang, xml:lang

For more information on standard attributes, check out our HTML standard attributes reference page.

Event attributes

NONE

For more information on event attributes, check out our HTML event attributes reference page.

Example

<html> <head> <title>All about rabbits</title> </head> <body> The rabbit is a fine animal that can hop around </body> </html>
Web Reference
  1. CSS reference
  2. RSS reference
  3. HTML reference


© Copyright 2011-2012 Landofcode.com
Terms of use | Privacy policy | Copyright information | Make a donation