Identifies the currently active element when DOM focus is on a composite
widget, textbox
, group
, or application
.
Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant
attribute.
Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made.
Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.
Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. See related aria-pressed
and aria-selected
.
Defines the total number of columns in a table
, grid
, or treegrid
. See related aria-colindex
.
Defines an element's column index or position with respect to the total number of columns within a table
, grid
, or treegrid
. See related aria-colcount
and aria-colspan
.
Defines the number of columns spanned by a cell or gridcell within a table
, grid
, or treegrid
. See related aria-colindex
and aria-rowspan
.
Indicates the element that represents the current item within a container or set of related elements.
Identifies the element (or elements) that describes the object. See related aria-labelledby
.
Identifies the element that provides a detailed, extended description for the object. See related aria-describedby
.
Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. See related aria-hidden
and aria-readonly
.
[Deprecated in ARIA 1.1] Indicates what functions can be performed when a dragged object is released on the drop target.
Identifies the element that provides an error message for the object. See related aria-invalid
and aria-describedby
.
Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order.
[Deprecated in ARIA 1.1] Indicates an element's "grabbed" state in a drag-and-drop operation.
Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
Indicates whether the element is exposed to an accessibility API. See related aria-disabled
.
Indicates the entered value does not conform to the format expected by the application. See related aria-errormessage
.
Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
Defines a string value that labels the current element. See related aria-labelledby
.
Identifies the element (or elements) that labels the current element. See related aria-describedby
.
Defines the hierarchical level of an element within a structure.
Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
Indicates whether an element is modal when displayed.
Indicates whether a text box accepts multiple lines of input or only a single line.
Indicates that the user may select more than one item from the current selectable descendants.
Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. See related aria-controls
.
Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format.
Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related aria-setsize
.
Indicates the current "pressed" state of toggle buttons. See related aria-checked
and aria-selected
.
Indicates that the element is not editable, but is otherwise operable. See related aria-disabled
.
Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. See related aria-atomic
.
Indicates that user input is required on the element before a form may be submitted.
Defines the total number of rows in a table
, grid
, or treegrid
. See related aria-rowindex
.
Defines an element's row index or position with respect to the total number of rows within a table
, grid
, or treegrid
. See related aria-rowcount
and aria-rowspan
.
Defines the number of rows spanned by a cell or gridcell within a table
, grid
, or treegrid
. See related aria-rowindex
and aria-colspan
.
Indicates the current "selected" state of various widgets. See related aria-checked
and aria-pressed
.
Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related aria-posinset
.
Indicates if items in a table or grid are sorted in ascending or descending order.
Defines the maximum allowed value for a range widget.
Defines the minimum allowed value for a range widget.
Defines the current value for a range widget. See related aria-valuetext
.
Defines the human readable text alternative of aria-valuenow
for a range widget.
Controls whether and how text input is automatically capitalized as it is entered/edited by the user. It can have the following values:
off
or none
, no autocapitalization is applied (all letters default to lowercase)on
or sentences
, the first letter of each sentence defaults to a capital letter; all other letters default to lowercasewords
, the first letter of each word defaults to a capital letter; all other letters default to lowercasecharacters
, all letters should default to uppercaseA 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()
.
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.The [**id**](#attr-id)
of a \<menu>
to use as the contextual menu for this element.
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 lets the user agent decide. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then it applies that directionality to the whole element.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.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.Used to transitively export shadow parts from a nested shadow tree into a containing light tree.
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.
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).
Provides a hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents. Used primarily on \<input>
elements, but is usable on any element while in [contenteditable](https://developer.mozilla.org/docs/Web/HTML/Global_attributes#attr-contenteditable)
mode.
Allows you to specify that a standard HTML element should behave like a registered custom built-in element (see Using custom elements for more details).
The unique, global identifier of an item.
Used to add properties to an item. Every HTML element may have an itemprop
attribute specified, where an itemprop
consists of a name and value pair.
Properties that are not descendants of an element with the itemscope
attribute can be associated with the item using an itemref
. It provides a list of element ids (not itemid
s) with additional properties elsewhere in the document.
itemscope
(usually) works along with [itemtype](https://developer.mozilla.org/docs/Web/HTML/Global_attributes#attr-itemtype)
to specify that the HTML contained in a block is about a particular item. itemscope
creates the Item and defines the scope of the itemtype
associated with it. itemtype
is a valid URL of a vocabulary (such as schema.org) that describes the item and its properties context.
Specifies the URL of the vocabulary that will be used to define itemprop
s (item properties) in the data structure. [itemscope](https://developer.mozilla.org/docs/Web/HTML/Global_attributes#attr-itemscope)
is used to set the scope of where in the data structure the vocabulary set by itemtype
will be active.
Helps define the language of an element: the language that non-editable elements are in, or the language that editable elements should be written in by the user. The attribute contains one “language tag” (made of hyphen-separated “language subtags”) in the format defined in Tags for Identifying Languages (BCP47). xml:lang has priority over it.
The loading of a resource has been aborted.
An element has lost focus (does not bubble).
The user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
The user agent can play the media up to its end without having to stop for further buffering of content.
The change event is fired for <input>, <select>, and <textarea> elements when a change to the element's value is committed by the user.
A pointing device button has been pressed and released on an element.
The right button of the mouse is clicked (before the context menu is displayed).
A pointing device button is clicked twice on an element.
An element or text selection is being dragged (every 350ms).
A drag operation is being ended (by releasing a mouse button or hitting the escape key).
A dragged element or text selection enters a valid drop target.
A dragged element or text selection leaves a valid drop target.
An element or text selection is being dragged over a valid drop target (every 350ms).
The user starts dragging an element or text selection.
An element is dropped on a valid drop target.
The duration attribute has been updated.
The media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it.
Playback has stopped because the end of the media was reached.
A resource failed to load.
An element has received focus (does not bubble).
The value of an element changes or the content of an element with the attribute contenteditable is modified.
A submittable element has been checked and doesn't satisfy its constraints.
A key is pressed down.
A key is pressed down and that key normally produces a character value (use input instead).
A key is released.
A resource and its dependent resources have finished loading.
The first frame of the media has finished loading.
The metadata has been loaded.
Progress has begun.
A pointing device button (usually a mouse) is pressed on an element.
A pointing device is moved onto the element that has the listener attached.
A pointing device is moved off the element that has the listener attached.
A pointing device is moved over an element.
A pointing device is moved off the element that has the listener attached or off one of its children.
A pointing device is moved onto the element that has the listener attached or onto one of its children.
A pointing device button is released over an element.
Playback has been paused.
Playback has begun.
Playback is ready to start after having been paused or delayed due to lack of data.
The pointer is unlikely to produce any more events.
The pointer enters the active buttons state.
Pointing device is moved inside the hit-testing boundary.
Pointing device is moved out of the hit-testing boundary.
The pointer was locked or released.
It was impossible to lock the pointer for technical reasons or because the permission was denied.
The pointer changed coordinates.
The pointing device moved out of hit-testing boundary or leaves detectable hover range.
The pointing device is moved into the hit-testing boundary.
The pointer leaves the active buttons state.
In progress.
The playback rate has changed.
The readyState attribute of a document has changed.
A form is reset.
The document view has been resized.
The document view or an element has been scrolled.
A seek operation completed.
A seek operation began.
Some text is being selected.
A contextmenu event was fired on/bubbled to an element that has a contextmenu attribute
The user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
A form is submitted.
Media data loading has been suspended.
The time indicated by the currentTime attribute has been updated.
The volume has changed.
Playback has stopped because of a temporary lack of data.
A space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part
pseudo-element.
Assigns a slot in a shadow DOM shadow tree to an element: An element with a slot
attribute is assigned to the slot created by the \<slot>
element whose [name](https://developer.mozilla.org/docs/Web/HTML/Element/slot#attr-name)
attribute's value matches that slot
attribute's value.
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.An integer attribute indicating 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 take 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. Such information can typically, but not necessarily, be presented to the user as a tooltip.
An enumerated attribute that is used to specify whether an element's attribute values and the values of its 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.This attribute instructs browsers to download a URL instead of navigating to it, so the user will be prompted to save it as a local file. If the attribute has a value, it is used as the pre-filled file name in the Save prompt (the user can still change the file name if they want). There are no restrictions on allowed values, though /
and \
are converted to underscores. Most file systems limit some punctuation in file names, and browsers will adjust the suggested name accordingly.
Notes:
blob:
URLs and data:
URLs are allowed so that content generated by JavaScript, such as pictures created in an image-editor Web app, can be downloaded.Content-Disposition:
gives a different filename than this attribute, the HTTP header takes priority over this attribute.Content-Disposition:
is set to inline
, Firefox prioritizes Content-Disposition
, like the filename case, while Chrome prioritizes the download
attribute.Contains a URL or a URL fragment that the hyperlink points to.
This attribute indicates the human language of the linked resource. It is purely advisory, with no built-in functionality. Allowed values are determined by BCP47.
Contains a space-separated list of URLs to which, when the hyperlink is followed, POST
requests with the body PING
will be sent by the browser (in the background). Typically used for tracking.
Indicates which referrer to send when fetching the URL:
'no-referrer'
means the Referer:
header will not be sent.'no-referrer-when-downgrade'
means no Referer:
header will be sent when navigating to an origin without HTTPS. This is the default behavior.'origin'
means the referrer will be the origin of the page, not including information after the domain.'origin-when-cross-origin'
meaning that navigations to other origins will be limited to the scheme, the host and the port, while navigations on the same origin will include the referrer's path.'strict-origin-when-cross-origin'
'unsafe-url'
means the referrer will include the origin and path, but not the fragment, password, or username. This is unsafe because it can leak data from secure URLs to insecure ones.Specifies the relationship of the target object to the link object. The value is a space-separated list of link types.
Specifies where to display the linked URL. It is a name of, or keyword for, a browsing context: a tab, window, or \<iframe>
. The following keywords have special meanings:
_self
: Load the URL into the same browsing context as the current one. This is the default behavior._blank
: Load the URL into a new browsing context. This is usually a tab, but users can configure browsers to use new windows instead._parent
: Load the URL into the parent browsing context of the current one. If there is no parent, this behaves the same way as _self
._top
: Load the URL into the top-level browsing context (that is, the "highest" browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this behaves the same way as _self
.Note: When using target
, consider adding rel="noreferrer"
to avoid exploitation of the window.opener
API.
Note: Linking to another page using target="_blank"
will run the new page on the same process as your page. If the new page is executing expensive JS, your page's performance may suffer. To avoid this use rel="noopener"
.
Specifies the media type in the form of a [MIME type](https://developer.mozilla.org/en-US/docs/Glossary/MIME_type "MIME type: A MIME type (now properly called "media type", but also sometimes "content type") is a string sent along with a file indicating the type of the file (describing the content format, for example, a sound file might be labeled audio/ogg, or an image file image/png).") for the linked URL. It is purely advisory, with no built-in functionality.
Specifies a keyboard navigation accelerator for the element. Pressing ALT or a similar key in association with the specified character selects the form control correlated with that key sequence. Page designers are forewarned to avoid key sequences already bound to browsers. This attribute is global since HTML5.
A Boolean attribute: if specified, the audio will automatically begin playback as soon as it can do so, without waiting for the entire audio file to finish downloading.
Note: Sites that automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so should be avoided when possible. If you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enable it). However, this can be useful when creating media elements whose source will be set at a later time, under user control.
If this attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback.
This enumerated attribute indicates whether to use CORS to fetch the related image. CORS-enabled resources can be reused in the \<canvas>
element without being tainted. The allowed values are:
anonymous
Sends a cross-origin request without a credential. In other words, it sends the Origin:
HTTP header without a cookie, X.509 certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (by not setting the Access-Control-Allow-Origin:
HTTP header), the image will be tainted, and its usage restricted.
use-credentials
Sends a cross-origin request with a credential. In other words, it sends the Origin:
HTTP header with a cookie, a certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (through Access-Control-Allow-Credentials:
HTTP header), the image will be tainted and its usage restricted.
When not present, the resource is fetched without a CORS request (i.e. without sending the Origin:
HTTP header), preventing its non-tainted used in \<canvas>
elements. If invalid, it is handled as if the enumerated keyword anonymous was used. See CORS settings attributes for additional information.
A Boolean attribute: if specified, the audio player will automatically seek back to the start upon reaching the end of the audio.
A Boolean attribute that indicates whether the audio will be initially silenced. Its default value is false
.
This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values:
none
: Indicates that the audio should not be preloaded.metadata
: Indicates that only audio metadata (e.g. length) is fetched.auto
: Indicates that the whole audio file can be downloaded, even if the user is not expected to use it.auto
value.If not set, preload
's default value is browser-defined (i.e. each browser may have its own default value). The spec advises it to be set to metadata
.
Usage notes:
autoplay
attribute has precedence over preload
. If autoplay
is specified, the browser would obviously need to start downloading the audio for playback.The URL of the audio to embed. This is subject to HTTP access controls. This is optional; you may instead use the \<source>
element within the audio block to specify the audio to embed.
The base URL to be used throughout the document for relative URL addresses. If this attribute is specified, this element must come before any other elements with attributes whose values are URLs. Absolute and relative URLs are allowed.
A name or keyword indicating the default location to display the result when hyperlinks or forms cause navigation, for elements that do not have an explicit target reference. It is a name of, or keyword for, a browsing context (for example: tab, window, or inline frame). The following keywords have special meanings:
_self
: Load the result into the same browsing context as the current one. This value is the default if the attribute is not specified._blank
: Load the result into a new unnamed browsing context._parent
: Load the result into the parent browsing context of the current one. If there is no parent, this option behaves the same way as _self
._top
: Load the result into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as _self
.If this attribute is specified, this element must come before any other elements with attributes whose values are URLs.
The direction in which text should be rendered in this element's contents. Possible values are:
ltr
: Indicates that the text should go in a left-to-right direction.rtl
: Indicates that the text should go in a right-to-left direction.A URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote.
URI of a image to use as a background. This method is non-conforming, use CSS background
property on the element instead.
Background color for the document. This method is non-conforming, use CSS background-color
property on the element instead.
The margin of the bottom of the body. This method is non-conforming, use CSS margin-bottom
property on the element instead.
The margin of the left of the body. This method is non-conforming, use CSS margin-left
property on the element instead.
Function to call after the user has printed the document.
Function to call when the user requests printing of the document.
Function to call when the document is about to be unloaded.
Function to call when the document loses focus.
Function to call when the document fails to load properly.
Function to call when the document receives focus.
Function to call when the fragment identifier part (starting with the hash ('#'
) character) of the document's current address has changed.
Function to call when the preferred languages changed.
Function to call when the document has finished loading.
Function to call when the document has received a message.
Function to call when network communication has failed.
Function to call when network communication has been restored.
Function to call when the user has navigated session history.
Function to call when the user has moved forward in undo transaction history.
Function to call when the document has been resized.
Function to call when the storage area has changed.
Function to call when the user has moved backward in undo transaction history.
Function to call when the document is going away.
The margin of the right of the body. This method is non-conforming, use CSS margin-right
property on the element instead.
Foreground color of text. This method is non-conforming, use CSS color
property on the element instead.
The margin of the top of the body. This method is non-conforming, use CSS margin-top
property on the element instead.
Indicates where to begin the next line after the break.
The use of this attribute on a \<button>
is nonstandard and Firefox-specific. By default, unlike other browsers, Firefox persists the dynamic disabled state of a \<button>
across page loads. Setting the value of this attribute to off
(i.e. autocomplete="off"
) disables this feature. See bug 654072.
This Boolean attribute lets you specify that the button should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. Only one form-associated element in a document can have this attribute specified.
This Boolean attribute indicates that the user cannot interact with the button. If this attribute is not specified, the button inherits its setting from the containing element, for example \<fieldset>
; if there is no containing element with the disabled attribute set, then the button is enabled.
Firefox will, unlike other browsers, by default, persist the dynamic disabled state of a \<button>
across page loads. Use the autocomplete
attribute to control this feature.
The form element that the button is associated with (its form owner). The value of the attribute must be the id attribute of a \<form>
element in the same document. If this attribute is not specified, the \<button>
element will be associated to an ancestor \<form>
element, if one exists. This attribute enables you to associate \<button>
elements to \<form>
elements anywhere within a document, not just as descendants of \<form>
elements.
The URI of a program that processes the information submitted by the button. If specified, it overrides the action
attribute of the button's form owner.
If the button is a submit button, this attribute specifies the type of content that is used to submit the form to the server. Possible values are:
application/x-www-form-urlencoded
: The default value if the attribute is not specified.multipart/form-data
: Use this value if you are using an \<input>
element with the type
attribute set to file
.text/plain
If this attribute is specified, it overrides the enctype
attribute of the button's form owner.
If the button is a submit button, this attribute specifies the HTTP method that the browser uses to submit the form. Possible values are:
post
: The data from the form are included in the body of the form and sent to the server.get
: The data from the form are appended to the form attribute URI, with a '?' as a separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters.If specified, this attribute overrides the method
attribute of the button's form owner.
If the button is a submit button, this Boolean attribute specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the novalidate
attribute of the button's form owner.
If the button is a submit button, this attribute is a name or keyword indicating where to display the response that is received after submitting the form. This is a name of, or keyword for, a browsing context (for example, tab, window, or inline frame). If this attribute is specified, it overrides the target
attribute of the button's form owner. The following keywords have special meanings:
_self
: Load the response into the same browsing context as the current one. This value is the default if the attribute is not specified._blank
: Load the response into a new unnamed browsing context._parent
: Load the response into the parent browsing context of the current one. If there is no parent, this option behaves the same way as _self
._top
: Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as _self
.The name of the button, which is submitted with the form data.
The type of the button. Possible values are:
submit
: The button submits the form data to the server. This is the default if the attribute is not specified, or if the attribute is dynamically changed to an empty or invalid value.reset
: The button resets all the controls to their initial values.button
: The button has no default behavior. It can have client-side scripts associated with the element's events, which are triggered when the events occur.The initial value of the button. It defines the value associated with the button which is submitted with the form data. This value is passed to the server in params when the form is submitted.
The height of the coordinate space in CSS pixels. Defaults to 150.
Lets the canvas know whether or not translucency will be a factor. If the canvas knows there's no translucency, painting performance can be optimized. This is only supported by Mozilla-based browsers; use the standardized canvas.getContext('2d', \{ alpha: false \})
instead.
The width of the coordinate space in CSS pixels. Defaults to 300.
This enumerated attribute indicates how the caption must be aligned with respect to the table. It may have one of the following values:
left
The caption is displayed to the left of the table.
top
The caption is displayed above the table.
right
The caption is displayed to the right of the table.
bottom
The caption is displayed below the table.
Usage note: Do not use this attribute, as it has been deprecated. The \<caption>
element should be styled using the CSS properties caption-side
and text-align
.
This enumerated attribute specifies how horizontal alignment of each column cell content will be handled. Possible values are:
left
, aligning the content to the left of the cellcenter
, centering the content in the cellright
, aligning the content to the right of the celljustify
, inserting spaces into the textual content so that the content is justified in the cellchar
, aligning the textual content on a special character with a minimal offset, defined by the char
and charoff
attributes Unimplemented (see bug 2212).If this attribute is not set, its value is inherited from the align
of the \<colgroup>
element this \<col>
element belongs too. If there are none, the left
value is assumed.
Note: Do not use this attribute as it is obsolete (not supported) in the latest standard.
left
, center
, right
or justify
values:text-align
property on a selector giving a \<col>
element. Because \<td>
elements are not descendant of the \<col>
element, they won't inherit it.colspan
attribute, use the td:nth-child(an+b)
CSS selector. Set a
to zero and b
to the position of the column in the table, e.g. td:nth-child(2) \{ text-align: right; \}
to right-align the second column.colspan
attribute, the effect can be achieved by combining adequate CSS attribute selectors like [colspan=n]
, though this is not trivial.char
value, in CSS3, you can use the value of the char
as the value of the text-align
property Unimplemented.This enumerated attribute specifies how horizontal alignment of each column cell content will be handled. Possible values are:
left
, aligning the content to the left of the cellcenter
, centering the content in the cellright
, aligning the content to the right of the celljustify
, inserting spaces into the textual content so that the content is justified in the cellchar
, aligning the textual content on a special character with a minimal offset, defined by the char
and charoff
attributes Unimplemented (see bug 2212).If this attribute is not set, the left
value is assumed. The descendant \<col>
elements may override this value using their own align
attribute.
Note: Do not use this attribute as it is obsolete (not supported) in the latest standard.
left
, center
, right
or justify
values:text-align
property on a selector giving a \<colgroup>
element. Because \<td>
elements are not descendant of the \<colgroup>
element, they won't inherit it.colspan
attribute, use one td:nth-child(an+b)
CSS selector per column, where a is the total number of the columns in the table and b is the ordinal position of this column in the table. Only after this selector the text-align
property can be used.colspan
attribute, the effect can be achieved by combining adequate CSS attribute selectors like [colspan=n]
, though this is not trivial.char
value, in CSS3, you can use the value of the char
as the value of the text-align
property Unimplemented.If the value of this attribute is set to yes
, the definition text will not wrap. The default value is no
.
A URI for a resource that explains the change (for example, meeting minutes).
This attribute indicates the time and date of the change and must be a valid date string with an optional time. If the value cannot be parsed as a date with an optional time string, the element does not have an associated time stamp. For the format of the string without a time, see Format of a valid date string in Date and time formats used in HTML. The format of the string if it includes both date and time is covered in Format of a valid local date and time string in Date and time formats used in HTML.
This Boolean attribute indicates whether or not the details — that is, the contents of the \<details>
element — are currently visible. The default, false
, means the details are not visible.
Indicates that the dialog is active and available for interaction. When the open
attribute is not set, the dialog shouldn't be shown to the user.
The displayed height of the resource, in CSS pixels. This must be an absolute value; percentages are not allowed.
The URL of the resource being embedded.
The MIME type to use to select the plug-in to instantiate.
The displayed width of the resource, in CSS pixels. This must be an absolute value; percentages are not allowed.
If this Boolean attribute is set, all form controls that are descendants of the \<fieldset>
, are disabled, meaning they are not editable and won't be submitted along with the \<form>
. They won't receive any browsing events, like mouse clicks or focus-related events. By default browsers display such controls grayed out. Note that form elements inside the \<legend>
element won't be disabled.
This attribute takes the value of the id
attribute of a \<form>
element you want the \<fieldset>
to be part of, even if it is not inside the form.
The name associated with the group.
Note: The caption for the fieldset is given by the first \<legend>
element nested inside it.
A space- or comma-delimited list of character encodings that the server accepts. The browser uses them in the order in which they are listed. The default value, the reserved string "UNKNOWN"
, indicates the same encoding as that of the document containing the form element.
In previous versions of HTML, the different character encodings could be delimited by spaces or commas. In HTML5, only spaces are allowed as delimiters.
The URI of a program that processes the form information. This value can be overridden by a formaction
attribute on a \<button>
or \<input>
element.
This is a nonstandard attribute used by iOS Safari Mobile which controls whether and how the text value for textual form control descendants should be automatically capitalized as it is entered/edited by the user. If the autocapitalize
attribute is specified on an individual form control descendant, it trumps the form-wide autocapitalize
setting. The non-deprecated values are available in iOS 5 and later. The default value is sentences
. Possible values are:
none
: Completely disables automatic capitalizationsentences
: Automatically capitalize the first letter of sentences.words
: Automatically capitalize the first letter of words.characters
: Automatically capitalize all characters.on
: Deprecated since iOS 5.off
: Deprecated since iOS 5.Indicates whether input elements can by default have their values automatically completed by the browser. This setting can be overridden by an autocomplete
attribute on an element belonging to the form. Possible values are:
off
: The user must explicitly enter a value into each field for every use, or the document provides its own auto-completion method; the browser does not automatically complete entries.on
: The browser can automatically complete values based on values that the user has previously entered in the form.For most modern browsers (including Firefox 38+, Google Chrome 34+, IE 11+) setting the autocomplete attribute will not prevent a browser's password manager from asking the user if they want to store login fields (username and password), if the user permits the storage the browser will autofill the login the next time the user visits the page. See The autocomplete attribute and login fields.
When the value of the method
attribute is post
, enctype is the MIME type of content that is used to submit the form to the server. Possible values are:
application/x-www-form-urlencoded
: The default value if the attribute is not specified.multipart/form-data
: The value used for an \<input>
element with the type
attribute set to "file".text/plain
: (HTML5)This value can be overridden by a formenctype
attribute on a \<button>
or \<input>
element.
The HTTP method that the browser uses to submit the form. Possible values are:
post
: Corresponds to the HTTP POST method ; form data are included in the body of the form and sent to the server.get
: Corresponds to the HTTP GET method; form data are appended to the action
attribute URI with a '?' as separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters.dialog
: Use when the form is inside a \<dialog>
element to close the dialog when submitted.This value can be overridden by a formmethod
attribute on a \<button>
or \<input>
element.
The name of the form. In HTML 4, its use is deprecated (id
should be used instead). It must be unique among the forms in a document and not just an empty string in HTML 5.
This Boolean attribute indicates that the form is not to be validated when submitted. If this attribute is not specified (and therefore the form is validated), this default setting can be overridden by a formnovalidate
attribute on a \<button>
or \<input>
element belonging to the form.
A name or keyword indicating where to display the response that is received after submitting the form. In HTML 4, this is the name/keyword for a frame. In HTML5, it is a name/keyword for a browsing context (for example, tab, window, or inline frame). The following keywords have special meanings:
_self
: Load the response into the same HTML 4 frame (or HTML5 browsing context) as the current one. This value is the default if the attribute is not specified._blank
: Load the response into a new unnamed HTML 4 window or HTML5 browsing context._parent
: Load the response into the HTML 4 frameset parent of the current frame, or HTML5 parent browsing context of the current one. If there is no parent, this option behaves the same way as _self
._top
: HTML 4: Load the response into the full original window, and cancel all other frames. HTML5: Load the response into the top-level browsing context (i.e., the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as _self
.\<iframe>
.HTML5: This value can be overridden by a formtarget
attribute on a \<button>
or \<input>
element.
The URIs of one or more metadata profiles, separated by white space.
Sets the alignment of the rule on the page. If no value is specified, the default value is left
.
Sets the color of the rule through color name or hexadecimal value.
Sets the rule to have no shading.
Sets the height, in pixels, of the rule.
Sets the length of the rule on the page through a pixel or percentage value.
Specifies the URI of a resource manifest indicating resources that should be cached locally. See Using the application cache for details.
Specifies the version of the HTML [Document Type Definition](https://developer.mozilla.org/en-US/docs/Glossary/DTD "Document Type Definition: In HTML, the doctype is the required "<!DOCTYPE html>" preamble found at the top of all documents. Its sole purpose is to prevent a browser from switching into so-called “quirks mode” when rendering a document; that is, the "<!DOCTYPE html>" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.") that governs the current document. This attribute is not needed, because it is redundant with the version information in the document type declaration.
Specifies the XML Namespace of the document. Default value is "http://www.w3.org/1999/xhtml"
. This is required in documents parsed with XML parsers, and optional in text/html documents.
Specifies a feature policy for the \<iframe>
.
Set to true
if the \<iframe>
can activate fullscreen mode by calling the requestFullscreen()
method.
Set to true
if a cross-origin \<iframe>
should be allowed to invoke the Payment Request API.
A Content Security Policy enforced for the embedded resource. See HTMLIFrameElement.csp
for details.
The height of the frame in CSS pixels. Default is 150
.
The download priority of the resource in the \<iframe>
's src
attribute. Allowed values:
auto
(default)
No preference. The browser uses its own heuristics to decide the priority of the resource.
high
The resource should be downloaded before other lower-priority page resources.
low
The resource should be downloaded after other higher-priority page resources.
Indicates which referrer to send when fetching the frame's resource:
no-referrer
: The Referer
header will not be sent.no-referrer-when-downgrade
(default): The Referer
header will not be sent to origins without TLS (HTTPS).origin
: The sent referrer will be limited to the origin of the referring page: its scheme, host, and port.origin-when-cross-origin
: The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.same-origin
: A referrer will be sent for same origin, but cross-origin requests will contain no referrer information.strict-origin
: Only send the origin of the document as the referrer when the protocol security level stays the same (HTTPS→HTTPS), but don't send it to a less secure destination (HTTPS→HTTP).strict-origin-when-cross-origin
: Send a full URL when performing a same-origin request, only send the origin when the protocol security level stays the same (HTTPS→HTTPS), and send no header to a less secure destination (HTTPS→HTTP).unsafe-url
: The referrer will include the origin and the path (but not the fragment, password, or username). This value is unsafe, because it leaks origins and paths from TLS-protected resources to insecure origins.Applies extra restrictions to the content in the frame. The value of the attribute can either be empty to apply all restrictions, or space-separated tokens to lift particular restrictions:
allow-forms
: Allows the resource to submit forms. If this keyword is not used, form submission is blocked.allow-modals
: Lets the resource open modal windows.allow-orientation-lock
: Lets the resource lock the screen orientation.allow-pointer-lock
: Lets the resource use the Pointer Lock API.allow-popups
: Allows popups (such as window.open()
, target="_blank"
, or showModalDialog()
). If this keyword is not used, the popup will silently fail to open.allow-popups-to-escape-sandbox
: Lets the sandboxed document open new windows without those windows inheriting the sandboxing. For example, this can safely sandbox an advertisement without forcing the same restrictions upon the page the ad links to.allow-presentation
: Lets the resource start a presentation session.allow-same-origin
: If this token is not used, the resource is treated as being from a special origin that always fails the same-origin policy.allow-scripts
: Lets the resource run scripts (but not create popup windows).allow-storage-access-by-user-activation
: Lets the resource request access to the parent's storage capabilities with the Storage Access API.allow-top-navigation
: Lets the resource navigate the top-level browsing context (the one named _top
).allow-top-navigation-by-user-activation
: Lets the resource navigate the top-level browsing context, but only if initiated by a user gesture.Notes about sandboxing:
allow-scripts
and allow-same-origin
, as that lets the embedded document remove the sandbox
attribute — making it no more secure than not using the sandbox
attribute at all.iframe
— such as if the viewer opens the frame in a new tab. Such content should be also served from a separate origin to limit potential damage.sandbox
attribute is unsupported in Internet Explorer 9 and earlier.The URL of the page to embed. Use a value of about:blank
to embed an empty page that conforms to the same-origin policy. Also note that programatically removing an \<iframe>
's src attribute (e.g. via Element.removeAttribute()
) causes about:blank
to be loaded in the frame in Firefox (from version 65), Chromium-based browsers, and Safari/iOS.
Inline HTML to embed, overriding the src
attribute. If a browser does not support the srcdoc
attribute, it will fall back to the URL in the src
attribute.
The width of the frame in CSS pixels. Default is 300
.
This attribute defines an alternative text description of the image.
Note: Browsers do not always display the image referenced by the element. This is the case for non-graphical browsers (including those used by people with visual impairments), if the user chooses not to display images, or if the browser cannot display the image because it is invalid or an unsupported type. In these cases, the browser may replace the image with the text defined in this element's alt
attribute. You should, for these reasons and others, provide a useful value for alt
whenever possible.
Note: Omitting this attribute altogether indicates that the image is a key part of the content, and no textual equivalent is available. Setting this attribute to an empty string (alt=""
) indicates that this image is not a key part of the content (decorative), and that non-visual browsers may omit it from rendering.
This enumerated attribute indicates if the fetching of the related image must be done using CORS or not. CORS-enabled images can be reused in the \<canvas>
element without being "tainted." The allowed values are:
Provides an image decoding hint to the browser. The allowed values are:
The intrinsic height of the image in pixels.
Indicates the relative importance of the resource. Priority hints are delegated using the values:
This attribute tells the browser to ignore the actual intrinsic size of the image and pretend it’s the size specified in the attribute. Specifically, the image would raster at these dimensions and naturalWidth
/naturalHeight
on images would return the values specified in this attribute. Explainer, examples
A string indicating which referrer to use when fetching the resource:
no-referrer:
The Referer
header will not be sent.no-referrer-when-downgrade:
No Referer
header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent’s default behavior if no policy is otherwise specified.origin:
The Referer
header will include the page of origin's scheme, the host, and the port.origin-when-cross-origin:
Navigating to other origins will limit the included referral data to the scheme, the host and the port, while navigating from the same origin will include the referrer's full path.unsafe-url:
The Referer
header will include the origin and the path, but not the fragment, password, or username. This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins.A list of one or more strings separated by commas indicating a set of source sizes. Each source size consists of:
Source size values specify the intended display size of the image. User agents use the current source size to select one of the sources supplied by the srcset
attribute, when those sources are described using width ('w
') descriptors. The selected source size affects the intrinsic size of the image (the image’s display size if no CSS styling is applied). If the srcset
attribute is absent, or contains no values with a width (w
) descriptor, then the sizes
attribute has no effect.
The image URL. This attribute is mandatory for the \<img>
element. On browsers supporting srcset
, src
is treated like a candidate image with a pixel density descriptor 1x
unless an image with this pixel density descriptor is already defined in srcset,
or unless srcset
contains 'w
' descriptors.
A list of one or more strings separated by commas indicating a set of possible image sources for the user agent to use. Each string is composed of:
w
'. The width descriptor is divided by the source size given in the sizes
attribute to calculate the effective pixel density.x
'.If no descriptor is specified, the source is assigned the default descriptor: 1x
.
It is incorrect to mix width descriptors and pixel density descriptors in the same srcset
attribute. Duplicate descriptors (for instance, two sources in the same srcset
which are both described with '2x
') are also invalid.
The user agent selects any one of the available sources at its discretion. This provides them with significant leeway to tailor their selection based on things like user preferences or bandwidth conditions. See our Responsive images tutorial for an example.
The intrinsic width of the image in pixels.
This attribute defines the URI of a resource that explains the change, such as a link to meeting minutes or a ticket in a troubleshooting system.
This attribute indicates the time and date of the change and must be a valid date with an optional time string. If the value cannot be parsed as a date with an optional time string, the element does not have an associated time stamp. For the format of the string without a time, see Format of a valid date string in Date and time formats used in HTML. The format of the string if it includes both date and time is covered in Format of a valid local date and time string in Date and time formats used in HTML.
The id
of a labelable form-related element in the same document as the \<label>
element. The first element in the document with an id
matching the value of the for
attribute is the labeled control for this label element, if it is a labelable element. If it is not labelable then the for
attribute has no effect. If there are other elements which also match the id
value, later in the document, they are not considered.
Note: A \<label>
element can have both a for
attribute and a contained control element, as long as the for
attribute points to the contained control element.
This character attribute indicates the numbering type:
a
: lowercase lettersA
: uppercase lettersi
: lowercase Roman numeralsI
: uppercase Roman numerals1
: numbersThis type overrides the one used by its parent \<ol>
element, if any.
Usage note: This attribute has been deprecated: use the CSS list-style-type
property instead.
This integer attribute indicates the current ordinal value of the list item as defined by the \<ol>
element. The only allowed value for this attribute is a number, even if the list is displayed with Roman numerals or letters. List items that follow this one continue numbering from the value set. The value attribute has no meaning for unordered lists (\<ul>
) or for menus (\<menu>
).
Note: This attribute was deprecated in HTML4, but reintroduced in HTML5.
Note: Prior to Gecko 9.0, negative values were incorrectly converted to 0. Starting in Gecko 9.0 all integer values are correctly parsed.
This attribute is only used when rel="preload"
or rel="prefetch"
has been set on the \<link>
element. It specifies the type of content being loaded by the \<link>
, which is necessary for content prioritization, request matching, application of correct content security policy, and setting of correct Accept
request header.
This enumerated attribute indicates whether CORS must be used when fetching the resource. CORS-enabled images can be reused in the \<canvas>
element without being tainted. The allowed values are:
anonymous
A cross-origin request (i.e. with an Origin
HTTP header) is performed, but no credential is sent (i.e. no cookie, X.509 certificate, or HTTP Basic authentication). If the server does not give credentials to the origin site (by not setting the Access-Control-Allow-Origin
HTTP header) the image will be tainted and its usage restricted.
use-credentials
A cross-origin request (i.e. with an Origin
HTTP header) is performed along with a credential sent (i.e. a cookie, certificate, and/or HTTP Basic authentication is performed). If the server does not give credentials to the origin site (through [Access-Control-Allow-Credentials
](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials "The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to frontend JavaScript code when the request's credentials mode (Request.credentials) is "include".") HTTP header), the resource will be tainted and its usage restricted.
If the attribute is not present, the resource is fetched without a CORS request (i.e. without sending the Origin
HTTP header), preventing its non-tainted usage. If invalid, it is handled as if the enumerated keyword anonymous was used. See CORS settings attributes for additional information.
This attribute specifies the URL of the linked resource. A URL can be absolute or relative.
Indicates the relative importance of the resource. Priority hints are delegated using the values:
Contains inline metadata — a base64-encoded cryptographic hash of the resource (file) you’re telling the browser to fetch. The browser can use this to verify that the fetched resource has been delivered free of unexpected manipulation. See Subresource Integrity.
This attribute specifies the media that the linked resource applies to. Its value must be a media type / media query. This attribute is mainly useful when linking to external stylesheets — it allows the user agent to pick the best adapted one for the device it runs on.
Notes:
print
, screen
, aural
, braille
. HTML5 extended this to any kind of media queries, which are a superset of the allowed values of HTML 4.A string indicating which referrer to use when fetching the resource:
no-referrer
means that the Referer
header will not be sent.no-referrer-when-downgrade
means that no Referer
header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent’s default behavior, if no policy is otherwise specified.origin
means that the referrer will be the origin of the page, which is roughly the scheme, the host, and the port.origin-when-cross-origin
means that navigating to other origins will be limited to the scheme, the host, and the port, while navigating on the same origin will include the referrer's path.unsafe-url
means that the referrer will include the origin and the path (but not the fragment, password, or username). This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins.This attribute names a relationship of the linked document to the current document. The attribute must be a space-separated list of the link types values.
This attribute defines the sizes of the icons for visual media contained in the resource. It must be present only if the rel
contains a value of icon
or a non-standard type such as Apple's apple-touch-icon
. It may have the following values:
any
, meaning that the icon can be scaled to any size as it is in a vector format, like image/svg+xml
._\<width in pixels>_x_\<height in pixels>_
or _\<width in pixels>_X_\<height in pixels>_
. Each of these sizes must be contained in the resource.Note: Most icon formats are only able to store one single icon; therefore most of the time the sizes
contains only one entry. MS's ICO format does, as well as Apple's ICNS. ICO is more ubiquitous; you should definitely use it.
The title
attribute has special semantics on the \<link>
element. When used on a \<link rel="stylesheet">
it defines a preferred or an alternate stylesheet. Incorrectly using it may cause the stylesheet to be ignored.
This attribute is used to define the type of the content linked to. The value of the attribute should be a MIME type such as text/html, text/css, and so on. The common use of this attribute is to define the type of stylesheet being referenced (such as text/css), but given that CSS is the only stylesheet language used on the web, not only is it possible to omit the type
attribute, but is actually now recommended practice. It is also used on rel="preload"
link types, to make sure the browser only downloads file types that it supports.
The name attribute gives the map a name so that it can be referenced. The attribute must be present and must have a non-empty value with no space characters. The value of the name attribute must not be a compatibility-caseless match for the value of the name attribute of another map element in the same document. If the id attribute is also specified, both attributes must have the same value.
This attribute declares the page's character encoding. It must contain a standard IANA MIME name for character encodings. Although the standard doesn't request a specific encoding, it suggests:
UTF-8
.JIS_C6226-1983
, JIS_X0212-1990
, HZ-GB-2312
, JOHAB
, the ISO-2022 family and the EBCDIC family.Note: ASCII-incompatible encodings are those that don't map the 8-bit code points 0x20
to 0x7E
to the 0x0020
to 0x007E
Unicode code points)
CESU-8
, UTF-7
, BOCU-1
and/or SCSU
as cross-site scripting attacks with these encodings have been demonstrated.UTF-32
because not all HTML5 encoding algorithms can distinguish it from UTF-16
.Notes:
\<meta>
element declaring the encoding must be inside the \<head>
element and within the first 1024 bytes of the HTML as some browsers only look at those bytes before choosing an encoding.\<meta>
element is only one part of the algorithm to determine a page's character set. The Content-Type
header and any Byte-Order Marks override this element.UTF-7
fallback cross-scripting technique.\<meta>
element with a charset
attribute is a synonym for the pre-HTML5 \<meta http-equiv="Content-Type" content="text/html; charset=_IANAcharset_">
, where IANAcharset
contains the value of the equivalent charset
attribute. This syntax is still allowed, although no longer recommended.This attribute contains the value for the http-equiv
or name
attribute, depending on which is used.
Defines a pragma directive. The attribute is named **http-equiv**(alent)
because all the allowed values are names of particular HTTP headers:
"content-language"
Defines the default language of the page. It can be overridden by the lang attribute on any element.Warning: Do not use this value, as it is obsolete. Prefer the lang
attribute on the \<html>
element.
"content-security-policy"
Allows page authors to define a content policy for the current page. Content policies mostly specify allowed server origins and script endpoints which help guard against cross-site scripting attacks."content-type"
Defines the MIME type of the document, followed by its character encoding. It follows the same syntax as the HTTP content-type
entity-header field, but as it is inside a HTML page, most values other than text/html
are impossible. Therefore the valid syntax for its content
is the string 'text/html
' 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.Warning: Do not use this value, as it is obsolete. Use the charset
attribute on the \<meta>
element.
Note: As \<meta>
can't change documents' types in XHTML or HTML5's XHTML serialization, never set the MIME type to an XHTML MIME type with \<meta>
.
"refresh"
This instruction specifies:content
attribute contains a positive integer.content
attribute contains a positive integer followed by the string ';url=
', and a valid URL."set-cookie"
Defines a cookie for the page. Its content must follow the syntax defined in the IETF HTTP Cookie Specification.Warning: Do not use this instruction, as it is obsolete. Use the HTTP header Set-Cookie
instead.
This attribute defines the name of a piece of document-level metadata. It should not be set if one of the attributes itemprop
, http-equiv
or charset
is also set.
This metadata name is associated with the value contained by the content
attribute. The possible values for the name attribute are:
application-name
which defines the name of the application running in the web page.Note:
Browsers may use this to identify the application. It is different from the \<title>
element, which usually contain the application name, but may also contain information like the document name or a status.
Simple web pages shouldn't define an application-name.
author
which defines the name of the document's author.
description
which contains a short and accurate summary of the content of the page. Several browsers, like Firefox and Opera, use this as the default description of bookmarked pages.
generator
which contains the identifier of the software that generated the page.
keywords
which contains words relevant to the page's content separated by commas.
referrer
which controls the Referer
HTTP header attached to requests sent from the document:
Values for the content
attribute of \<meta name="referrer">
no-referrer
Do not send a HTTP Referrer
header.
origin
Send the origin of the document.
no-referrer-when-downgrade
Send the origin as a referrer to URLs as secure as the current page, (https→https), but does not send a referrer to less secure URLs (https→http). This is the default behaviour.
origin-when-cross-origin
Send the full URL (stripped of parameters) for same-origin requests, but only send the origin for other cases.
same-origin
A referrer will be sent for same-site origins, but cross-origin requests will contain no referrer information.
strict-origin
Only send the origin of the document as the referrer to a-priori as-much-secure destination (HTTPS->HTTPS), but don't send it to a less secure destination (HTTPS->HTTP).
strict-origin-when-cross-origin
Send a full URL when performing a same-origin request, only send the origin of the document to a-priori as-much-secure destination (HTTPS->HTTPS), and send no header to a less secure destination (HTTPS->HTTP).
unsafe-URL
Send the full URL (stripped of parameters) for same-origin or cross-origin requests.
Notes:
always
, default
, and never
for referrer.\<meta name="referrer">
(with document.write
or appendChild
) makes the referrer behaviour unpredictable.This attribute may also have a value taken from the extended list defined on WHATWG Wiki MetaExtensions page. Although none have been formally accepted yet, a few commonly used names are:
creator
which defines the name of the creator of the document, such as an organization or institution. If there are more than one, several \<meta>
elements should be used.googlebot
, a synonym of robots
, is only followed by Googlebot (the indexing crawler for Google).publisher
which defines the name of the document's publisher.robots
which defines the behaviour that cooperative crawlers, or "robots", should use with the page. It is a comma-separated list of the values below:Values for the content of \<meta name="robots">
Value
Description
Used by
index
Allows the robot to index the page (default).
All
noindex
Requests the robot to not index the page.
All
follow
Allows the robot to follow the links on the page (default).
All
nofollow
Requests the robot to not follow the links on the page.
All
none
Equivalent to noindex, nofollow
noodp
Prevents using the Open Directory Project description, if any, as the page description in search engine results.
noarchive
Requests the search engine not to cache the page content.
nosnippet
Prevents displaying any description of the page in search engine results.
noimageindex
Requests this page not to appear as the referring page of an indexed image.
nocache
Synonym of noarchive
.
Notes:
Only cooperative robots follow these rules. Do not expect to prevent e-mail harvesters with them.
The robot still needs to access the page in order to read these rules. To prevent bandwidth consumption, use a robots.txt file.
If you want to remove a page, noindex
will work, but only after the robot visits the page again. Ensure that the robots.txt
file is not preventing revisits.
Some values are mutually exclusive, like index
and noindex
, or follow
and nofollow
. In these cases the robot's behaviour is undefined and may vary between them.
Some crawler robots, like Google, Yahoo and Bing, support the same values for the HTTP header X-Robots-Tag
; this allows non-HTML documents like images to use these rules.
slurp
, is a synonym of robots
, but only for Slurp - the crawler for Yahoo Search.
viewport
, which gives hints about the size of the initial size of the viewport. Used by mobile devices only.
Values for the content of \<meta name="viewport">
Value
Possible subvalues
Description
width
A positive integer number, or the text device-width
Defines the pixel width of the viewport that you want the web site to be rendered at.
height
A positive integer, or the text device-height
Defines the height of the viewport. Not used by any browser.
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 amount to zoom in. It must be greater or equal to the minimum-scale
or the behaviour is undefined. Browser settings can ignore this rule and iOS10+ ignores it by default.
minimum-scale
A positive number between 0.0
and 10.0
Defines the minimum zoom level. It must be smaller or equal to the maximum-scale
or the behaviour is undefined. Browser settings can ignore this rule and iOS10+ ignores it by default.
user-scalable
yes
or no
If set to no
, the user is not able to zoom in the webpage. The default is yes
. Browser settings can ignore this rule, and iOS10+ ignores it by default.
Specification
Status
Comment
CSS Device Adaptation The definition of '<meta name="viewport">' in that specification.
Working Draft
Non-normatively describes the Viewport META element
See also: [\@viewport
](https://developer.mozilla.org/en-US/docs/Web/CSS/@viewport "The @viewport CSS at-rule lets you configure the viewport through which the document is viewed. It's primarily used for mobile devices, but is also used by desktop browsers that support features like "snap to edge" (such as Microsoft Edge).")
Notes:
This attribute defines the scheme in which metadata is described. A scheme is a context leading to the correct interpretations of the content
value, like a format.
Warning: Do not use this value, as it is obsolete. There is no replacement as there was no real usage for it.
This attribute associates the element with a form
element that has ownership of the meter
element. For example, a meter
might be displaying a range corresponding to an input
element of type
number. This attribute is only used if the meter
element is being used as a form-associated element; even then, it may be omitted if the element appears as a descendant of a form
element.
The lower numeric bound of the high end of the measured range. This must be less than the maximum value (max
attribute), and it also must be greater than the low value and minimum value (low
attribute and min attribute, respectively), if any are specified. If unspecified, or if greater than the maximum value, the high
value is equal to the maximum value.
The upper numeric bound of the low end of the measured range. This must be greater than the minimum value (min
attribute), and it also must be less than the high value and maximum value (high
attribute and max
attribute, respectively), if any are specified. If unspecified, or if less than the minimum value, the low
value is equal to the minimum value.
The upper numeric bound of the measured range. This must be greater than the minimum value (min
attribute), if specified. If unspecified, the maximum value is 1.
The lower numeric bound of the measured range. This must be less than the maximum value (max
attribute), if specified. If unspecified, the minimum value is 0.
This attribute indicates the optimal numeric value. It must be within the range (as defined by the min
attribute and max
attribute). When used with the low
attribute and high
attribute, it gives an indication where along the range is considered preferable. For example, if it is between the min
attribute and the low
attribute, then the lower range is considered preferred.
The current numeric value. This must be between the minimum and maximum values (min
attribute and max
attribute) if they are specified. If unspecified or malformed, the value is 0. If specified, but not within the range given by the min
attribute and max
attribute, the value is equal to the nearest end of the range.
Usage note: Unless the value
attribute is between 0
and 1
(inclusive), the min
and max
attributes should define the range so that the value
attribute's value is within it.
A space-separated list of URIs for archives of resources for the object.
The width of a border around the control, in pixels.
The URI of the object's implementation. It can be used together with, or in place of, the data attribute.
The base path used to resolve relative URIs specified by classid, data, or archive. If not specified, the default is the base URI of the current document.
The content type of the data specified by classid.
The address of the resource as a valid URL. At least one of data and type must be defined.
The presence of this Boolean attribute makes this element a declaration only. The object must be instantiated by a subsequent \<object>
element. In HTML5, repeat the <object> element completely each that that the resource is reused.
The form element, if any, that the object element is associated with (its form owner). The value of the attribute must be an ID of a \<form>
element in the same document.
The height of the displayed resource, in CSS pixels. -- (Absolute values only. NO percentages)
The name of valid browsing context (HTML5), or the name of the control (HTML 4).
A message that the browser can show while loading the object's implementation and data.
The position of the element in the tabbing navigation order for the current document.
The content type of the resource specified by data. At least one of data and type must be defined.
This Boolean attribute indicates if the type attribute and the actual content type of the resource must match to be used.
The width of the display resource, in CSS pixels. -- (Absolute values only. NO percentages)
This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the user agent and it doesn't work in all browsers.
Warning: Do not use this attribute, as it has been deprecated: the \<ol>
element should be styled using CSS. To give an effect similar to the compact
attribute, the CSS property line-height
can be used with a value of 80%
.
This Boolean attribute specifies that the items of the list are specified in reversed order.
This integer attribute specifies the start value for numbering the individual list items. Although the ordering type of list elements might be Roman numerals, such as XXXI, or letters, the value of start is always represented as a number. To start numbering elements from the letter "C", use \<ol start="3">
.
Note: This attribute was deprecated in HTML4, but reintroduced in HTML5.
Indicates the numbering type:
'a'
indicates lowercase letters,'A'
indicates uppercase letters,'i'
indicates lowercase Roman numerals,'I'
indicates uppercase Roman numerals,'1'
indicates numbers (default).The type set is used for the entire list unless a different type
attribute is used within an enclosed \<li>
element.
Note: This attribute was deprecated in HTML4, but reintroduced in HTML5.
Unless the value of the list number matters (e.g. in legal or technical documents where items are to be referenced by their number/letter), the CSS list-style-type
property should be used instead.
If this Boolean attribute is set, none of the items in this option group is selectable. Often browsers grey out such control and it won't receive any browsing events, like mouse clicks or focus-related ones.
The name of the group of options, which the browser can use when labeling the options in the user interface. This attribute is mandatory if this element is used.
If this Boolean attribute is set, this option is not checkable. Often browsers grey out such control and it won't receive any browsing event, like mouse clicks or focus-related ones. If this attribute is not set, the element can still be disabled if one of its ancestors is a disabled \<optgroup>
element.
This attribute is text for the label indicating the meaning of the option. If the label
attribute isn't defined, its value is that of the element text content.
The content of this attribute represents the value to be submitted with the form, should this option be selected. If this attribute is omitted, the value is taken from the text content of the option element.
A space-separated list of other elements’ id
s, indicating that those elements contributed input values to (or otherwise affected) the calculation.
The form element that this element is associated with (its "form owner"). The value of the attribute must be an id
of a form element in the same document. If this attribute is not specified, the output element must be a descendant of a form element. This attribute enables you to place output elements anywhere within a document, not just as descendants of their form elements.
The name of the element, exposed in the HTMLFormElement
API.
Name of the parameter.
Only used if the valuetype
is set to "ref". Specifies the MIME type of values found at the URI specified by value.
Specifies the value of the parameter.
Specifies the type of the value
attribute. Possible values are:
\<object>
in the same document.Contains the preferred count of characters that a line should have. Though technically still implemented, this attribute has no visual effect; to achieve such an effect, use CSS width
instead.
Is a hint indicating how the overflow must happen. In modern browser this hint is ignored and no visual effect results in its present; to achieve such an effect, use CSS white-space
instead.
This attribute describes how much work the task indicated by the progress
element requires. The max
attribute, if present, must have a value greater than zero and be a valid floating point number. The default value is 1.
This attribute specifies how much of the task that has been completed. It must be a valid floating point number between 0 and max
, or between 0 and 1 if max
is omitted. If there is no value
attribute, the progress bar is indeterminate; this indicates that an activity is ongoing with no indication of how long it is expected to take.
The value of this attribute is a URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote.
This is a Boolean attribute indicating that the browser should, if possible, load the script asynchronously.
This attribute must not be used if the src
attribute is absent (i.e. for inline scripts). If it is included in this case it will have no effect.
Browsers usually assume the worst case scenario and load scripts synchronously, (i.e. async="false"
) during HTML parsing.
Dynamically inserted scripts (using document.createElement()
) load asynchronously by default, so to turn on synchronous loading (i.e. scripts load in the order they were inserted) set async="false"
.
See Browser compatibility for notes on browser support. See also Async scripts for asm.js.
Normal script
elements pass minimal information to the window.onerror
for scripts which do not pass the standard CORS checks. To allow error logging for sites which use a separate domain for static media, use this attribute. See CORS settings attributes for a more descriptive explanation of its valid arguments.
This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed, but before firing DOMContentLoaded
.
Scripts with the defer
attribute will prevent the DOMContentLoaded
event from firing until the script has loaded and finished evaluating.
This attribute must not be used if the src
attribute is absent (i.e. for inline scripts), in this case it would have no effect.
To achieve a similar effect for dynamically inserted scripts use async="false"
instead. Scripts with the defer
attribute will execute in the order in which they appear in the document.
This attribute contains inline metadata that a user agent can use to verify that a fetched resource has been delivered free of unexpected manipulation. See Subresource Integrity.
This Boolean attribute is set to indicate that the script should not be executed in browsers that support ES2015 modules — in effect, this can be used to serve fallback scripts to older browsers that do not support modular JavaScript code.
A cryptographic nonce (number used once) to whitelist inline scripts in a script-src Content-Security-Policy. The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource's policy is otherwise trivial.
Indicates which referrer to send when fetching the script, or resources fetched by the script:
no-referrer
: The Referer
header will not be sent.no-referrer-when-downgrade
(default): The Referer
header will not be sent to origins without TLS (HTTPS).origin
: The sent referrer will be limited to the origin of the referring page: its scheme, host, and port.origin-when-cross-origin
: The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.same-origin
: A referrer will be sent for same origin, but cross-origin requests will contain no referrer information.strict-origin
: Only send the origin of the document as the referrer when the protocol security level stays the same (e.g. HTTPS→HTTPS), but don't send it to a less secure destination (e.g. HTTPS→HTTP).strict-origin-when-cross-origin
: Send a full URL when performing a same-origin request, but only send the origin when the protocol security level stays the same (e.g.HTTPS→HTTPS), and send no header to a less secure destination (e.g. HTTPS→HTTP).unsafe-url
: The referrer will include the origin and the path (but not the fragment, password, or username). This value is unsafe, because it leaks origins and paths from TLS-protected resources to insecure origins.Note: An empty string value (""
) is both the default value, and a fallback value if referrerpolicy
is not supported. If referrerpolicy
is not explicitly specified on the \<script>
element, it will adopt a higher-level referrer policy, i.e. one set on the whole document or domain. If a higher-level policy is not available, the empty string is treated as being equivalent to no-referrer-when-downgrade
.
This attribute specifies the URI of an external script; this can be used as an alternative to embedding a script directly within a document.
If a script
element has a src
attribute specified, it should not have a script embedded inside its tags.
Like the textContent
attribute, this attribute sets the text content of the element. Unlike the textContent
attribute, however, this attribute is evaluated as executable code after the node is inserted into the DOM.
This attribute indicates the type of script represented. The value of this attribute will be in one of the following categories:
src
attribute) code. JavaScript MIME types are listed in the specification.module
: For HTML5-compliant browsers the code is treated as a JavaScript module. The processing of the script contents is not affected by the charset
and defer
attributes. For information on using module
, see ES6 in Depth: Modules. Code may behave differently when the module
keyword is used.src
attribute will be ignored.Note: in Firefox you could specify the version of JavaScript contained in a \<script>
element by including a non-standard version
parameter inside the type
attribute — for example type="text/javascript;version=1.8"
. This has been removed in Firefox 59 (see bug 1428745).
A DOMString
providing a hint for a user agent's autocomplete feature. See The HTML autocomplete attribute for a complete list of values and details on how to use autocomplete.
This Boolean attribute lets you specify that a form control should have input focus when the page loads. Only one form element in a document can have the autofocus
attribute.
This Boolean attribute indicates that the user cannot interact with the control. If this attribute is not specified, the control inherits its setting from the containing element, for example fieldset
; if there is no containing element with the disabled
attribute set, then the control is enabled.
This attribute lets you specify the form element to which the select element is associated (that is, its "form owner"). If this attribute is specified, its value must be the same as the id
of a form element in the same document. This enables you to place select elements anywhere within a document, not just as descendants of their form elements.
This Boolean attribute indicates that multiple options can be selected in the list. If it is not specified, then only one option can be selected at a time. When multiple
is specified, most browsers will show a scrolling list box instead of a single line dropdown.
This attribute is used to specify the name of the control.
A Boolean attribute indicating that an option with a non-empty string value must be selected.
If the control is presented as a scrolling list box (e.g. when multiple
is specified), this attribute represents the number of rows in the list that should be visible at one time. Browsers are not required to present a select element as a scrolled list box. The default value is 0.
Note: According to the HTML5 specification, the default value for size should be 1; however, in practice, this has been found to break some web sites, and no other browser currently does that, so Mozilla has opted to continue to return 0 for the time being with Firefox.
Media query of the resource's intended media; this should be used only in a \<picture>
element.
Is a list of source sizes that describes the final rendered width of the image represented by the source. Each source size consists of a comma-separated list of media condition-length pairs. This information is used by the browser to determine, before laying the page out, which image defined in srcset
to use.
The sizes
attribute has an effect only when the \<source>
element is the direct child of a \<picture>
element.
Required for \<audio>
and \<video>
, address of the media resource. The value of this attribute is ignored when the \<source>
element is placed inside a \<picture>
element.
A list of one or more strings separated by commas indicating a set of possible images represented by the source for the browser to use. Each string is composed of:
'w'
. The default value, if missing, is the infinity.'x'
. The default value, if missing, is 1x
.Each string in the list must have at least a width descriptor or a pixel density descriptor to be valid. Among the list, there must be only one string containing the same tuple of width descriptor and pixel density descriptor.
The browser chooses the most adequate image to display at a given point of time.
The srcset
attribute has an effect only when the \<source>
element is the direct child of a \<picture>
element.
The MIME-type of the resource, optionally with a codecs
parameter. See RFC 4281 for information about how to specify codecs.
This attribute defines which media the style should be applied to. Its value is a media query, which defaults to all
if the attribute is missing.
A cryptographic nonce (number used once) used to whitelist inline styles in a style-src Content-Security-Policy. The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource’s policy is otherwise trivial.
This attribute specifies alternative style sheet sets.
This attribute defines the styling language as a MIME type (charset should not be specified). This attribute is optional and defaults to text/css
if it is not specified — there is very little reason to include this in modern web documents.
This enumerated attribute indicates how the table must be aligned inside the containing document. It may have the following values:
Usage Note
\<table>
element should be styled using CSS. Set margin-left
and margin-right
to auto
or margin
to 0 auto
to achieve an effect that is similar to the align attribute.middle
, absmiddle
, and abscenter
values as synonyms of center
, in quirks mode only.This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:
left
, aligning the content to the left of the cellcenter
, centering the content in the cellright
, aligning the content to the right of the celljustify
, inserting spaces into the textual content so that the content is justified in the cellchar
, aligning the textual content on a special character with a minimal offset, defined by the char
and charoff
attributes.If this attribute is not set, the left
value is assumed.
Note: Do not use this attribute as it is obsolete (not supported) in the latest standard.
left
, center
, right
or justify
values, use the CSS text-align
property on it.char
value, in CSS3, you can use the value of the char
as the value of the text-align
property Unimplemented.This attribute contains a short abbreviated description of the cell's content. Some user-agents, such as speech readers, may present this description before the content itself.
Note: Do not use this attribute as it is obsolete in the latest standard. Alternatively, you can put the abbreviated description inside the cell and place the long content in the title attribute.
This enumerated attribute specifies how the cell content's horizontal alignment will be handled. Possible values are:
left
: The content is aligned to the left of the cell.center
: The content is centered in the cell.right
: The content is aligned to the right of the cell.justify
(with text only): The content is stretched out inside the cell so that it covers its entire width.char
(with text only): The content is aligned to a character inside the \<th>
element with minimal offset. This character is defined by the char
and charoff
attributes Unimplemented (see bug 2212).The default value when this attribute is not specified is left
.
Note: Do not use this attribute as it is obsolete in the latest standard.
left
, center
, right
or justify
values, apply the CSS text-align
property to the element.char
value, give the text-align
property the same value you would use for the char
. Unimplemented in CSS3.This attribute contains a list of space-separated strings. Each string is the id
of a group of cells that this header applies to.
Note: Do not use this attribute as it is obsolete in the latest standard.
This attribute defines the background color of each cell in a column. It consists of a 6-digit hexadecimal code as defined in sRGB and is prefixed by '#'. This attribute may be used with one of sixteen predefined color strings:
black
= "#000000"
green
= "#008000"
silver
= "#C0C0C0"
lime
= "#00FF00"
gray
= "#808080"
olive
= "#808000"
white
= "#FFFFFF"
yellow
= "#FFFF00"
maroon
= "#800000"
navy
= "#000080"
red
= "#FF0000"
blue
= "#0000FF"
purple
= "#800080"
teal
= "#008080"
fuchsia
= "#FF00FF"
aqua
= "#00FFFF"
Note: Do not use this attribute, as it is non-standard and only implemented in some versions of Microsoft Internet Explorer: The \<td>
element should be styled using CSS. To create a similar effect use the background-color
property in CSS instead.
This is a non-standard attribute supported by WebKit on iOS (therefore nearly all browsers running on iOS, including Safari, Firefox, and Chrome), which controls whether and how the text value should be automatically capitalized as it is entered/edited by the user. The non-deprecated values are available in iOS 5 and later. Possible values are:
none
: Completely disables automatic capitalization.sentences
: Automatically capitalize the first letter of sentences.words
: Automatically capitalize the first letter of words.characters
: Automatically capitalize all characters.on
: Deprecated since iOS 5.off
: Deprecated since iOS 5.This attribute indicates whether the value of the control can be automatically completed by the browser. Possible values are:
off
: The user must explicitly enter a value into this field for every use, or the document provides its own auto-completion method; the browser does not automatically complete the entry.on
: The browser can automatically complete the value based on values that the user has entered during previous uses.If the autocomplete
attribute is not specified on a \<textarea>
element, then the browser uses the autocomplete
attribute value of the \<textarea>
element's form owner. The form owner is either the \<form>
element that this \<textarea>
element is a descendant of or the form element whose id
is specified by the form
attribute of the input element. For more information, see the autocomplete
attribute in \<form>
.
This Boolean attribute lets you specify that a form control should have input focus when the page loads. Only one form-associated element in a document can have this attribute specified.
The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. If it is not specified, the default value is 20
.
This Boolean attribute indicates that the user cannot interact with the control. If this attribute is not specified, the control inherits its setting from the containing element, for example \<fieldset>
; if there is no containing element when the disabled
attribute is set, the control is enabled.
The form element that the \<textarea>
element is associated with (its "form owner"). The value of the attribute must be the id
of a form element in the same document. If this attribute is not specified, the \<textarea>
element must be a descendant of a form element. This attribute enables you to place \<textarea>
elements anywhere within a document, not just as descendants of form elements.
The maximum number of characters (unicode code points) that the user can enter. If this value isn't specified, the user can enter an unlimited number of characters.
The minimum number of characters (unicode code points) required that the user should enter.
The name of the control.
A hint to the user of what can be entered in the control. Carriage returns or line-feeds within the placeholder text must be treated as line breaks when rendering the hint.
Note: Placeholders should only be used to show an example of the type of data that should be entered into a form; they are not a substitute for a proper \<label>
element tied to the input. See Labels and placeholders in <input>: The Input (Form Input) element for a full explanation.
This Boolean attribute indicates that the user cannot modify the value of the control. Unlike the disabled
attribute, the readonly
attribute does not prevent the user from clicking or selecting in the control. The value of a read-only control is still submitted with the form.
This attribute specifies that the user must fill in a value before submitting a form.
The number of visible text lines for the control.
Specifies whether the \<textarea>
is subject to spell checking by the underlying browser/OS. the value can be:
true
: Indicates that the element needs to have its spelling and grammar checked.default
: Indicates that the element is to act according to a default behavior, possibly based on the parent element's own spellcheck
value.false
: Indicates that the element should not be spell checked.Indicates how the control wraps text. Possible values are:
hard
: The browser automatically inserts line breaks (CR+LF) so that each line has no more than the width of the control; the cols
attribute must also be specified for this to take effect.soft
: The browser ensures that all line breaks in the value consist of a CR+LF pair, but does not insert any additional line breaks.off
: Like soft
but changes appearance to white-space: pre
so line segments exceeding cols
are not wrapped and the \<textarea>
becomes horizontally scrollable.If this attribute is not specified, soft
is its default value.
This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:
left
, aligning the content to the left of the cellcenter
, centering the content in the cellright
, aligning the content to the right of the celljustify
, inserting spaces into the textual content so that the content is justified in the cellchar
, aligning the textual content on a special character with a minimal offset, defined by the char
and charoff
attributes Unimplemented (see bug 2212).If this attribute is not set, the left
value is assumed.
Note: Do not use this attribute as it is obsolete (not supported) in the latest standard.
left
, center
, right
or justify
values, use the CSS text-align
property on it.char
value, in CSS3, you can use the value of the char
as the value of the text-align
property Unimplemented.This attribute contains a short abbreviated description of the cell's content. Some user-agents, such as speech readers, may present this description before the content itself.
This enumerated attribute specifies how the cell content's horizontal alignment will be handled. Possible values are:
left
: The content is aligned to the left of the cell.center
: The content is centered in the cell.right
: The content is aligned to the right of the cell.justify
(with text only): The content is stretched out inside the cell so that it covers its entire width.char
(with text only): The content is aligned to a character inside the \<th>
element with minimal offset. This character is defined by the char
and charoff
attributes.The default value when this attribute is not specified is left
.
Note: Do not use this attribute as it is obsolete in the latest standard.
left
, center
, right
or justify
values, apply the CSS text-align
property to the element.char
value, give the text-align
property the same value you would use for the char
. Unimplemented in CSS3.This attribute contains a list of space-separated strings. Each string is the id
of a group of cells that this header applies to.
Note: Do not use this attribute as it is obsolete in the latest standard: use the scope
attribute instead.
This attribute defines the background color of each cell in a column. It consists of a 6-digit hexadecimal code as defined in sRGB and is prefixed by '#'. This attribute may be used with one of sixteen predefined color strings:
black
= "#000000"
green
= "#008000"
silver
= "#C0C0C0"
lime
= "#00FF00"
gray
= "#808080"
olive
= "#808000"
white
= "#FFFFFF"
yellow
= "#FFFF00"
maroon
= "#800000"
navy
= "#000080"
red
= "#FF0000"
blue
= "#0000FF"
purple
= "#800080"
teal
= "#008080"
fuchsia
= "#FF00FF"
aqua
= "#00FFFF"
Note: Do not use this attribute, as it is non-standard and only implemented in some versions of Microsoft Internet Explorer: The \<th>
element should be styled using CSS. To create a similar effect use the background-color
property in CSS instead.
This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:
left
, aligning the content to the left of the cellcenter
, centering the content in the cellright
, aligning the content to the right of the celljustify
, inserting spaces into the textual content so that the content is justified in the cellchar
, aligning the textual content on a special character with a minimal offset, defined by the char
and charoff
attributes Unimplemented (see bug 2212).If this attribute is not set, the left
value is assumed.
Note: Do not use this attribute as it is obsolete (not supported) in the latest standard.
left
, center
, right
or justify
values, use the CSS text-align
property on it.char
value, in CSS3, you can use the value of the char
as the value of the text-align
property Unimplemented.This attribute indicates the time and/or date of the element and must be in one of the formats described below.
A DOMString
which specifies how the cell's context should be aligned horizontally within the cells in the row; this is shorthand for using align
on every cell in the row individually. Possible values are:
left
Align the content of each cell at its left edge.
center
Center the contents of each cell between their left and right edges.
right
Align the content of each cell at its right edge.
justify
Widen whitespaces within the text of each cell so that the text fills the full width of each cell (full justification).
char
Align each cell in the row on a specific character (such that each row in the column that is configured this way will horizontally align its cells on that character). This uses the char
and charoff
to establish the alignment character (typically "." or "," when aligning numerical data) and the number of characters that should follow the alignment character. This alignment type was never widely supported.
If no value is expressly set for align
, the parent node's value is inherited.
Instead of using the obsolete align
attribute, you should instead use the CSS text-align
property to establish left
, center
, right
, or justify
alignment for the row's cells. To apply character-based alignment, set the CSS text-align
property to the alignment character (such as "."
or ","
).
This attribute indicates that the track should be enabled unless the user's preferences indicate that another track is more appropriate. This may only be used on one track
element per media element.
How the text track is meant to be used. If omitted the default kind is subtitles
. If the attribute is not present, it will use the subtitles
. If the attribute contains an invalid value, it will use metadata
. (Versions of Chrome earlier than 52 treated an invalid value as subtitles
.) The following keywords are allowed:
subtitles
captions
descriptions
chapters
metadata
A user-readable title of the text track which is used by the browser when listing available text tracks.
Address of the track (.vtt
file). Must be a valid URL. This attribute must be specified and its URL value must have the same origin as the document — unless the \<audio>
or \<video>
parent element of the track
element has a crossorigin
attribute.
Language of the track text data. It must be a valid BCP 47 language tag. If the kind
attribute is set to subtitles,
then srclang
must be defined.
This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the user agent and it doesn't work in all browsers.
**Usage note: **Do not use this attribute, as it has been deprecated: the \<ul>
element should be styled using CSS. To give a similar effect as the compact
attribute, the CSS property line-height can be used with a value of 80%
.
A Boolean attribute; if specified, the video automatically begins to play back as soon as it can do so without stopping to finish loading the data.
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.
MDN Reference