HTML meta 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 meta tag provides information about the actual document. This information may vary from a document to another because there are no preestablished name or values for this tag. The values of the special attributes and their interpretation depends on the profile description defined in the
HTML head tag.
Example:
Code begin
<html>
<head>
<title>Car rental in New York</title>
<meta name="Author" content="Jhon Doe" />
<meta name="keywords" lang="en" content="car, rental, rent" />
<meta name="keywords" lang="es" content="autos, alquiler, alquila" />
<meta name="description" lang="en" content="Car rental in New York. Cheap prices best insurance. Call now 999-NO-NUMBER." />
<meta http-equiv="expires" content="Mon, 20 Sep 2006 11:09:00 GMT" />
</head>
<body>
Contents...
</body>
</html>Code end
Attributes
Asssigns a name to the property.
Assigns a content value for the property.
Names a scheme that will be used to interpret the property's value.
http-equiv (name)
Works like the "name" attribute and can be used instead.
HTTP servers use this attribute to gather information for HTTP response message headers.
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
Events
There are no events defined for this tag.
See complete list and information about
events in HTML