Provides a hint for generating a keyboard shortcut for the current element.
Provides a hint for generating a keyboard shortcut for the current element. This attribute consists of a space-separated list of characters. The browser should use the first one that exists on the computer keyboard layout.
This attribute declares the character encoding used of the page.
This attribute declares the character encoding used of the page. It can be locally overridden using the lang attribute on any element. This attribute is a literal string and must be one of the preferred MIME name for a character encoding as defined by the IANA. Though the standard doesn't request a specific character encoding, it gives some recommendations:
Notes:
<meta>
element must be inside the <head>
element and within the 512 first bytes of the page, as some browsers only look at these first bytes before choosing a character set for the page.
- This <meta>
element is only a part of the algorithm to determine the character set of a page that browsers apply. The HTTP Content-Type header and any BOM elements have precedence over this element.
- It is good practice, and strongly recommended, to define the character set using this attribute. If no character set is defined for a page, several cross-scripting techniques may be able to harm the page user, such as the UTF-7 fallback cross-scripting technique. Always setting this meta will protect against these risks.
- This <meta>
element is a synonym for the pre-HTML5 <meta http-equiv="Content-Type" content="text/html; charset=IANAcharset">
where IANAcharset
corresponds of the value of the equivalent charset
attribute. This syntax is still allowed, although obsolete and no more recommended.
Is a space-separated list of the classes of the element.
Is a space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the
class selectors or functions like the method
Document.getElementsByClassName()
.
This attribute gives the value associated with the
http-equiv
or
name
attribute, depending of the context.
This attribute gives the value associated with the
http-equiv
or
name
attribute, depending of the context.
Is an enumerated attribute indicating if the element should be editable by the user.
Is an enumerated attribute indicating if the element should be editable by the user. If so, the browser modifies its widget to allow editing. The attribute must take one of the following values:
true
or the empty string, which indicates that the element must be editable;false
, which indicates that the element must not be editable.Is the
id
of an
<menu>
to use as the contextual menu for this element.
Is an enumerated attribute indicating the directionality of the element's text.
Is an enumerated attribute indicating the directionality of the element's text. It can have the following values:
ltr
, which means left to right and is to be used for languages that are written from the left to the right (like English);rtl
, which means right to left and is to be used for languages that are written from the right to the left (like Arabic);auto
, which let the user agent decides. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then apply that directionality to the whole element.Is an enumerated attribute indicating whether the element can be dragged, using the Drag and Drop API.
Is an enumerated attribute indicating whether the element can be dragged, using the Drag and Drop API. It can have the following values:
true
, which indicates that the element may be draggedfalse
, which indicates that the element may not be dragged.Is an enumerated attribute indicating what types of content can be dropped on an element, using the Drag and Drop API.
Is an enumerated attribute indicating what types of content can be dropped on an element, using the Drag and Drop API. It can have the following values:
copy
, which indicates that dropping will create a copy of the element that was draggedmove
, which indicates that the element that was dragged will be moved to this new location.link
, will create a link to the dragged data.Is a Boolean attribute indicates that the element is not yet, or is no longer, relevant.
Is a Boolean attribute indicates that the element is not yet, or is no longer, relevant. For example, it can be used to hide elements of the page that can't be used until the login process has been completed. The browser won't render such elements. This attribute must not be used to hide content that could legitimately be shown.
This enumerated attribute defines the pragma that can alter servers and user-agents behavior.
This enumerated attribute defines the pragma that can alter servers and user-agents behavior. The value of the pragma is defined using the
content
and can be one of the following:
<dl>
<dt>
content-language
</dt>
<body>
element instead.
content-type
entity-header field, but as it is inside an HTML Element, most values are not possible. Therefore the valid syntax for its content is the literal string '
text/html
' eventually followed by a character set with the following syntax:'
; charset=
IANAcharset
' where
IANAcharset
is the
preferred MIME name for a character set as
defined by the IANA.
Usage note:
- Do not use this pragma as it is obsolete. Use the charset
attribute on the <meta>
element instead.
- As the <meta>
may not be used to change the type of a document in an XHTML document, or in an HTML5 document following the XHTML syntax, never set MIME type to an XHTML MIME type that way. It would be incorrect.
- Only an HTML document can use the content-type, so most of it is redundant: that's why it has been obsoleted and replaced by the charset
attribute.
content
attribute must contain the
title of a
<link>
element whose
href
attribute links to a CSS stylesheet, or the
title of a
<style>
element which contains a
CSS stylesheet.
content
attribute contains only a positive integer number;
- the number of seconds until the page should be redirected to another, if the content
attribute contains a positive integer number followed by the string ';url=
' and a valid URL.
Defines a unique identifier (ID) which must be unique in the whole document.
Defines a unique identifier (ID) which must be unique in the whole document. Its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with CSS).
These attributes are related to the WHATWG HTML Microdata feature.
These attributes are related to the WHATWG HTML Microdata feature.
Participates in defining the language of the element, the language that non-editable elements are written in or the language that editable elements should be written in.
Participates in defining the language of the element, the language that non-editable elements are written in or the language that editable elements should be written in. The tag contains one single entry value in the format defines in the Tags for Identifying Languages (BCP47) IETF document. xml:lang has priority over it.
This attribute defines the name of document-level metadata.
This attribute defines the name of document-level metadata. It should not be set if one of the attributes
itemprop
,
http-equiv
or
charset
is also set.
This document-level metadata name is associated with a value, contained by the
content
attribute. The possible values for the name element are, with their associated value, stored via the
content
attribute:
application-name
, defining the name of the web application running in the webpage;Note:
<title>
element, which usually consist of the application name but may also contain specific information like the document name or a status;author
, defining, in a free format, the name of the author of the document;description
, containing a short and accurate summary of the content of the page. Several browsers, among them Firefox and Opera, use this meta as the default description of the page when bookmarked;generator
, containing, in a free format, the identifier to the software that generated the page;keywords
, containing, as strings separated by commas, relevant words associated with the content of the page;referrer
controlling the content of the HTTP Referer
HTTP header attached to any request sent from this document:
no-referrer |
Do not send a HTTP Referer header. |
origin |
Send the origin of the document. |
no-referrer-when-downgrade |
Send the origin as referrer to a-priori as-much-secure destination (https->https), but doesn't send a referrer to a less secure destination (https->http). This is the default behavior. |
origin-when-crossorigin |
Send a full URL (stripped from parameters) when performing a same-origin request, but only send the origin of the document for other cases. |
unsafe-URL |
Send a full URL (stripped from parameters) when perfoming a same-origin request. |
Note: Dynamically inserting
<meta name="referrer">
(by document.write or appendChild) create a non-determinism when it comes to sending referrers or not. Note also that when several conflicting policies are defined, the No-referrer policy is applied.
The attribute may also have a value taken from the extended list defined on WHATWG Wiki MetaExtensions page. Although none has been formally accepted yet, a few commonly used names are among the proposals:
creator
, defining, in a free format, the name of the creator of the document. Note that it can be the name of the institution. If there are more than one, several <meta>
elements should be used;
- googlebot
, which is a synonym of robots
, but is only followed by Googlebot, the indexing crawler for Google;
- publisher
, defining, in a free format, the name of the publisher of the document. Note that it can be the name of the institution;
- robots
, defining the behavior that cooperative crawlers should have with the page. It is a comma-separated list of values taken in the following list:
Value | Description | Used by |
---|---|---|
index |
Allows the robot to index the page | All |
noindex |
Prevents the robot from indexing the page | All |
follow |
Allows the robot to follow the links on the page | All |
nofollow |
Prevents the robot from following the links on the page | All |
noodp |
Prevents the usage of the Open Directory Project description, if any, as the description of the page in the search engine results page | Google, Yahoo, Bing |
noarchive |
Prevents the search engine from caching the content of the page | Google, Yahoo |
nosnippet |
Prevents the display of any description of the page in the search engine results page | |
noimageindex |
Prevents this page from appearing as the referring page of an indexed image | |
noydir |
Prevents the usage of the Yahoo Directory description, if any, as the description of the page in the search engine results page | Yahoo |
nocache |
Synonym of noarchive |
Bing |
noindex
will work, but only when the robot visit the page again. Be sure not to prevent such visits, via the robots.txt file for example. Some search engines have developers tools, allowing a quick removal of some page.
- Some possible values are mutually exclusive, like using index
and noindex
, or follow
and nofollow
, at the same time. In these cases the behavior of the robot is undefined, and may vary from one to the other. So avoid these cases.
- Some search engine crawler robots, like those of Google, Yahoo Search or Bing, support the same values on an HTTP directive, X-Robot-Tags
: this allows them to use these pragma on non-HTML documents, like images.
- slurp
, which is a synonym of robots
, but is only followed by Slurp, the indexing crawler for Yahoo Search;
Finally a few names are in common use, though not in progress of being standardized:
- viewport
, which gives hints about the size of the initial size of the viewport. This pragma is used by several mobile devices only.
Value | Possible values | Description |
---|---|---|
width |
a positive integer number or the literal device-width |
defines the width, in pixels, of the viewport |
height |
a positive integer number of the literal device-height |
defines the height, in pixels, of the viewport |
initial-scale |
a positive number between 0.0 and 10.0 |
defines the ratio between the device width (device-width in portrait mode or device-height in landscape mode) and the viewport size. |
maximum-scale |
a positive number between 0.0 and 10.0 |
defines the maximum value of the zoom; it must be greater or equal to the minimum-scale or the behavior is indeterminate. |
minimum-scale |
a positive number between 0.0 and 10.0 |
defines the minimum value of the zoom; it must be smaller or equal to the maximum-scale or the behavior is indeterminate. |
user-scalable |
a boolean value (yes or no ) |
If set to no , the user is not able to zoom in the webpage. Default value is yes . |
Specification | Status | Comment |
---|---|---|
CSS Device Adaptation The definition of '<meta name="viewport">' in that specification. |
Working Draft | Non-normatively describes the Viewport META element |
@viewport
Notes:
- Though not standardized, this attribute is used by different mobile browsers like Safari Mobile, Firefox for Mobile or Opera Mobile.
- The default values may change from one device, and browser, to another.
- To learn about this pragma in Firefox for Mobile, see this article.
This attribute defines the scheme in which the metadata is described.
This attribute defines the scheme in which the metadata is described. A scheme is a context leading to the correct interpretations of the
content
value, like a format.
Notes: Do not use this attribute as it is obsolete. There is no replacement for it as there was no real usage for it. Omit it altogether.
Is an enumerated attribute defines whether the element may be checked for spelling errors.
Is an enumerated attribute defines whether the element may be checked for spelling errors. It may have the following values:
true
, which indicates that the element should be, if possible, checked for spelling errors;false
, which indicates that the element should not be checked for spelling errors.Contains CSS styling declarations to be applied to the element.
Is an integer attribute indicates if the element can take input focus (is focusable), if it should participate to sequential keyboard navigation, and if so, at what position.
Is an integer attribute indicates if the element can take input focus (is focusable), if it should participate to sequential keyboard navigation, and if so, at what position. It can takes several values:
0
means that the element should be focusable and reachable via sequential keyboard navigation, but its relative order is defined by the platform convention;Contains a text representing advisory information related to the element it belongs to.
Contains a text representing advisory information related to the element it belongs to. Such information can typically, but not necessarily, be presented to the user as a tooltip.
Is an enumerated attribute that is used to specify whether an element's attribute values and the values of it
s
Text
node children are to be translated when the page is localized, or whether to leave them unchanged.
Is an enumerated attribute that is used to specify whether an element's attribute values and the values of it
s
Text
node children are to be translated when the page is localized, or whether to leave them unchanged. It can have the following values:
"yes"
, which indicates that the element will be translated."no
", which indicates that the element will not be translated.
The HTML Meta Element (<meta>) represents any metadata information that cannot be represented by one of the other HTML meta-related elements (
<base>
,<link>
,<script>
,<style>
or<title>
). Depending on the attributes set, the kind of metadata can be one of the following:name
is set, it is document-level metadata, applying to the whole page.http-equiv
is set, it is a pragma directive, i.e. information normally given by the web server about how the web page should be served.charset
is set, it is a charset declaration, i.e. the charset used for the serialized form of the webpage. HTML5itemprop
is set, it is user-defined metadata, transparent for the user-agent as the semantics of the metadata is user-specific. Living Standard Unimplemented