Versión en español

HTML title 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 title tag is an important part of a document. Titles must describe the document's content as accurate as possible, but not being too long. Titles are defined in the head of the document.

Example:

Code begin <head>
<title>The impact of drugs in modern society</title>
</head>
<body>
...A lot of writing about drugs and modern society...
</body>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
 
 


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