Versión en español

HTML html tag

Note: If you don't know what a tag is and/or how you must use it we recommend you to read our HTML tags and attributes tutorial that you can find in our HTML tutorials section.

 

Description

The HTML html tag contains all the HTML document, with the exception of the HTML !DOCTYPE tag, defined at the beginning of the document.

Example:

Code begin <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
All the HTML document goes here...
</html>Code end
 


Attributes

lang (langcode)

Specifies the language of an element's content. The default value in "unknown".

When writing XHTML code the syntax "xml:lang" represents a preferred alternative in XHTML 1.0 and a replacement in XHTML 1.1 (e.g., xml:lang="en").

Example:

Code begin <p lang="en">This is a paragraph in english.</p>
<p lang="es">Este es un p&aacute;rrafo en espa&ntilde;ol.</p>Code end
 
 

dir

Specifies the text direction of the element's contents and attribute values, as well as tables directionality. It has two possible values that are case insensitive:
  • RTL: Right to left.
  • LTR: Left to right.
Example:

Code begin <q lang="he" dir="rtl">...a Hebrew quotation...</q>Code end
 
 

version (cdata)

This attribute have been deprecated

Defines the version of the HTML document. It's been deprecated because of the redundancy produced with the HTML DOCTYPE tag.
 


Events

There are no events defined for this tag.

See complete list and information about events in HTML


Bypass footer options Send to a friend Send to a friend