HTML head 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.
The
HTML head tag defines a block where authors can declare information about the document, as the title, description, keywords, etc., as well as other data that's not considered to be document content. Browsers don't usually render this information (with the exception of the title). The head block is declared before the body (renderable part).
Example:
Code begin
<html>
<head>
<title>Car rental in New York</title>
<link rel="alternate" hreflang="es" href="es-version.html" />
<meta name="Author" content="Jhon Doe" />
<meta name="keywords" lang="en" content="car, rental, rent" />
<meta name="keywords" lang="es" content="autos, alquiler, alquila" />
</head>
<body>
Contens...
</body>
</html>Code end
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árrafo en españ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
profile (uri)
Points to a document containing a metadata profile. Profiles defines properties that may be used by the
HTML meta tag and the
HTML link tag. There are no prescribed formats for profiles.
Example:
Code begin
<head profile="http://www.htmlquick.com/profile">Code end
There are no events defined for this tag.
See complete list and information about
events in HTML