Type Parameters

  • T

Hierarchy

  • HTMLAttrs

Properties

[accesskey] [aria-activedescendant] [aria-atomic] [aria-autocomplete] [aria-busy] [aria-checked] [aria-colcount] [aria-colindex] [aria-colspan] [aria-controls] [aria-current] [aria-describedby] [aria-details] [aria-disabled] [aria-dropeffect] [aria-errormessage] [aria-expanded] [aria-flowto] [aria-grabbed] [aria-haspopup] [aria-hidden] [aria-invalid] [aria-keyshortcuts] [aria-label] [aria-labelledby] [aria-level] [aria-live] [aria-modal] [aria-multiline] [aria-multiselectable] [aria-orientation] [aria-owns] [aria-placeholder] [aria-posinset] [aria-pressed] [aria-readonly] [aria-relevant] [aria-required] [aria-roledescription] [aria-rowcount] [aria-rowindex] [aria-rowspan] [aria-selected] [aria-setsize] [aria-sort] [aria-valuemax] [aria-valuemin] [aria-valuenow] [aria-valuetext] [autocapitalize] [class] [contenteditable] [contextmenu] [dir] [draggable] [dropzone] [exportparts] [hidden] [id] [inputmode] [is] [itemid] [itemprop] [itemref] [itemscope] [itemtype] [lang] [onabort] [onblur] [oncanplay] [oncanplaythrough] [onchange] [onclick] [oncontextmenu] [ondblclick] [ondrag] [ondragend] [ondragenter] [ondragleave] [ondragover] [ondragstart] [ondrop] [ondurationchange] [onemptied] [onended] [onerror] [onfocus] [onformchange] [onforminput] [oninput] [oninvalid] [onkeydown] [onkeypress] [onkeyup] [onload] [onloadeddata] [onloadedmetadata] [onloadstart] [onmousedown] [onmouseenter] [onmouseleave] [onmousemove] [onmouseout] [onmouseover] [onmouseup] [onmousewheel] [onpause] [onplay] [onplaying] [onpointercancel] [onpointerdown] [onpointerenter] [onpointerleave] [onpointerlockchange] [onpointerlockerror] [onpointermove] [onpointerout] [onpointerover] [onpointerup] [onprogress] [onratechange] [onreadystatechange] [onreset] [onresize] [onscroll] [onseeked] [onseeking] [onselect] [onshow] [onstalled] [onsubmit] [onsuspend] [ontimeupdate] [onvolumechange] [onwaiting] [part] [role] [slot] [spellcheck] [style] [tabindex] [title] [translate] a[download] a[href] a[hreflang] a[ping] a[referrerpolicy] a[rel] a[target] a[type] area[accesskey] area[alt] area[coords] area[download] area[href] area[hreflang] area[ping] area[rel] area[shape] area[target] area[type] audio[autoplay] audio[controls] audio[crossorigin] audio[loop] audio[mediagroup] audio[muted] audio[preload] audio[src] base[href] base[target] bdo[dir] blockquote[cite] body[alink] body[background] body[bgcolor] body[bottommargin] body[leftmargin] body[link] body[onafterprint] body[onbeforeprint] body[onbeforeunload] body[onblur] body[onerror] body[onfocus] body[onhashchange] body[onlanguagechange] body[onload] body[onmessage] body[onoffline] body[ononline] body[onpagehide] body[onpageshow] body[onpopstate] body[onredo] body[onresize] body[onstorage] body[onundo] body[onunload] body[rightmargin] body[text] body[topmargin] body[vlink] br[clear] button[autocomplete] button[autofocus] button[disabled] button[form] button[formaction] button[formenctype] button[formmethod] button[formnovalidate] button[formtarget] button[name] button[type] button[value] canvas[height] canvas[moz-opaque] canvas[width] caption[align] col[align] col[span] colgroup[align] colgroup[span] dd[nowrap] del[cite] del[datetime] details[open] dialog[open] embed[height] embed[src] embed[type] embed[width] fieldset[disabled] fieldset[form] fieldset[name] form[accept-charset] form[accept] form[action] form[autocapitalize] form[autocomplete] form[enctype] form[method] form[name] form[novalidate] form[target] head[profile] hr[align] hr[color] hr[noshade] hr[size] hr[width] html[manifest] html[version] html[xmlns] iframe[allow] iframe[allowfullscreen] iframe[allowpaymentrequest] iframe[csp] iframe[height] iframe[importance] iframe[name] iframe[referrerpolicy] iframe[sandbox] iframe[seamless] iframe[src] iframe[srcdoc] iframe[width] img[alt] img[crossorigin] img[decoding] img[height] img[importance] img[intrinsicsize] img[ismap] img[referrerpolicy] img[sizes] img[src] img[srcset] img[usemap] img[width] input[accept] input[alt] input[autocomplete] input[autofocus] input[checked] input[dirname] input[disabled] input[form] input[formaction] input[formenctype] input[formmethod] input[formnovalidate] input[formtarget] input[height] input[inputmode] input[list] input[max] input[maxlength] input[min] input[minlength] input[multiple] input[name] input[pattern] input[placeholder] input[readonly] input[required] input[size] input[src] input[step] input[type] input[value] input[width] ins[cite] ins[datetime] label[for] label[form] li[type] li[value] link[as] link[crossorigin] link[href] link[hreflang] link[importance] link[integrity] link[media] link[referrerpolicy] link[rel] link[sizes] link[title] link[type] map[name] meta[charset] meta[content] meta[http-equiv] meta[name] meta[scheme] meter[form] meter[high] meter[low] meter[max] meter[min] meter[optimum] meter[value] object[archive] object[border] object[classid] object[codebase] object[codetype] object[data] object[declare] object[form] object[height] object[name] object[standby] object[tabindex] object[type] object[typemustmatch] object[usemap] object[width] ol[compact] ol[reversed] ol[start] ol[type] optgroup[disabled] optgroup[label] option[disabled] option[label] option[selected] option[value] output[for] output[form] output[name] param[name] param[type] param[value] param[valuetype] pre[cols] pre[width] pre[wrap] progress[max] progress[value] q[cite] script[async] script[charset] script[crossorigin] script[defer] script[integrity] script[nomodule] script[nonce] script[referrerpolicy] script[src] script[text] script[type] select[autocomplete] select[autofocus] select[disabled] select[form] select[multiple] select[name] select[required] select[size] source[media] source[sizes] source[src] source[srcset] source[type] style[media] style[nonce] style[scoped] style[title] style[type] table[align] table[border] tbody[align] td[abbr] td[align] td[axis] td[bgcolor] td[colspan] td[headers] td[rowspan] textarea[autocapitalize] textarea[autocomplete] textarea[autofocus] textarea[cols] textarea[dirname] textarea[disabled] textarea[form] textarea[inputmode] textarea[maxlength] textarea[minlength] textarea[name] textarea[placeholder] textarea[readonly] textarea[required] textarea[rows] textarea[spellcheck] textarea[wrap] tfoot[align] th[abbr] th[align] th[axis] th[bgcolor] th[colspan] th[headers] th[rowspan] th[scope] th[sorted] thead[align] time[datetime] tr[align] track[default] track[kind] track[label] track[src] track[srclang] ul[compact] video[autoplay] video[controls] video[crossorigin] video[height] video[loop] video[mediagroup] video[muted] video[poster] video[preload] video[src] video[width]

Properties

[accesskey]: T

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

[aria-activedescendant]: T

Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.

WAI-ARIA Reference

[aria-atomic]: T

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.

WAI-ARIA Reference

[aria-autocomplete]: T

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.

WAI-ARIA Reference

[aria-busy]: T

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.

WAI-ARIA Reference

[aria-checked]: T

Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. See related aria-pressed and aria-selected.

WAI-ARIA Reference

[aria-colcount]: T

Defines the total number of columns in a table, grid, or treegrid. See related aria-colindex.

WAI-ARIA Reference

[aria-colindex]: T

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.

WAI-ARIA Reference

[aria-colspan]: T

Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. See related aria-colindex and aria-rowspan.

WAI-ARIA Reference

[aria-controls]: T

Identifies the element (or elements) whose contents or presence are controlled by the current element. See related aria-owns.

WAI-ARIA Reference

[aria-current]: T

Indicates the element that represents the current item within a container or set of related elements.

WAI-ARIA Reference

[aria-describedby]: T

Identifies the element (or elements) that describes the object. See related aria-labelledby.

WAI-ARIA Reference

[aria-details]: T

Identifies the element that provides a detailed, extended description for the object. See related aria-describedby.

[aria-disabled]: T

Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. See related aria-hidden and aria-readonly.

WAI-ARIA Reference

[aria-dropeffect]: T

[Deprecated in ARIA 1.1] Indicates what functions can be performed when a dragged object is released on the drop target.

WAI-ARIA Reference

[aria-errormessage]: T

Identifies the element that provides an error message for the object. See related aria-invalid and aria-describedby.

WAI-ARIA Reference

[aria-expanded]: T

Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.

WAI-ARIA Reference

[aria-flowto]: T

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.

WAI-ARIA Reference

[aria-grabbed]: T

[Deprecated in ARIA 1.1] Indicates an element's "grabbed" state in a drag-and-drop operation.

WAI-ARIA Reference

[aria-haspopup]: T

Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.

WAI-ARIA Reference

[aria-hidden]: T

Indicates whether the element is exposed to an accessibility API. See related aria-disabled.

WAI-ARIA Reference

[aria-invalid]: T

Indicates the entered value does not conform to the format expected by the application. See related aria-errormessage.

WAI-ARIA Reference

[aria-keyshortcuts]: T

Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.

[aria-label]: T

Defines a string value that labels the current element. See related aria-labelledby.

WAI-ARIA Reference

[aria-labelledby]: T

Identifies the element (or elements) that labels the current element. See related aria-describedby.

WAI-ARIA Reference

[aria-level]: T

Defines the hierarchical level of an element within a structure.

WAI-ARIA Reference

[aria-live]: T

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.

WAI-ARIA Reference

[aria-modal]: T

Indicates whether an element is modal when displayed.

WAI-ARIA Reference

[aria-multiline]: T

Indicates whether a text box accepts multiple lines of input or only a single line.

WAI-ARIA Reference

[aria-multiselectable]: T

Indicates that the user may select more than one item from the current selectable descendants.

WAI-ARIA Reference

[aria-orientation]: T

Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.

WAI-ARIA Reference

[aria-owns]: T

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.

WAI-ARIA Reference

[aria-placeholder]: T

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.

WAI-ARIA Reference

[aria-posinset]: T

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.

WAI-ARIA Reference

[aria-pressed]: T

Indicates the current "pressed" state of toggle buttons. See related aria-checked and aria-selected.

WAI-ARIA Reference

[aria-readonly]: T

Indicates that the element is not editable, but is otherwise operable. See related aria-disabled.

WAI-ARIA Reference

[aria-relevant]: T

Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. See related aria-atomic.

WAI-ARIA Reference

[aria-required]: T

Indicates that user input is required on the element before a form may be submitted.

WAI-ARIA Reference

[aria-roledescription]: T

Defines a human-readable, author-localized description for the role of an element.

WAI-ARIA Reference

[aria-rowcount]: T

Defines the total number of rows in a table, grid, or treegrid. See related aria-rowindex.

WAI-ARIA Reference

[aria-rowindex]: T

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.

WAI-ARIA Reference

[aria-rowspan]: T

Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. See related aria-rowindex and aria-colspan.

WAI-ARIA Reference

[aria-selected]: T

Indicates the current "selected" state of various widgets. See related aria-checked and aria-pressed.

WAI-ARIA Reference

[aria-setsize]: T

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.

WAI-ARIA Reference

[aria-sort]: T

Indicates if items in a table or grid are sorted in ascending or descending order.

WAI-ARIA Reference

[aria-valuemax]: T

Defines the maximum allowed value for a range widget.

WAI-ARIA Reference

[aria-valuemin]: T

Defines the minimum allowed value for a range widget.

WAI-ARIA Reference

[aria-valuenow]: T

Defines the current value for a range widget. See related aria-valuetext.

WAI-ARIA Reference

[aria-valuetext]: T

Defines the human readable text alternative of aria-valuenow for a range widget.

WAI-ARIA Reference

[autocapitalize]: T

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 lowercase
  • words, the first letter of each word defaults to a capital letter; all other letters default to lowercase
  • characters, all letters should default to uppercase

MDN Reference

[class]: T

A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method Document.getElementsByClassName().

MDN Reference

[contenteditable]: T

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.

MDN Reference

[contextmenu]: T

The [**id**](#attr-id) of a \<menu> to use as the contextual menu for this element.

MDN Reference

[dir]: T

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.

MDN Reference

[draggable]: T

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 dragged
  • false, which indicates that the element may not be dragged.

MDN Reference

[dropzone]: T

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 dragged
  • move, which indicates that the element that was dragged will be moved to this new location.
  • link, will create a link to the dragged data.
[exportparts]: T

Used to transitively export shadow parts from a nested shadow tree into a containing light tree.

MDN Reference

[hidden]: T

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.

MDN Reference

[id]: T

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).

MDN Reference

[inputmode]: T

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.

MDN Reference

[is]: T

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).

MDN Reference

[itemid]: T

The unique, global identifier of an item.

MDN Reference

[itemprop]: T

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.

MDN Reference

[itemref]: T

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 itemids) with additional properties elsewhere in the document.

MDN Reference

[itemscope]: T

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.

MDN Reference

[itemtype]: T

Specifies the URL of the vocabulary that will be used to define itemprops (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.

MDN Reference

[lang]: T

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.

MDN Reference

[onabort]: T

The loading of a resource has been aborted.

[onblur]: T

An element has lost focus (does not bubble).

[oncanplay]: T

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.

[oncanplaythrough]: T

The user agent can play the media up to its end without having to stop for further buffering of content.

[onchange]: T

The change event is fired for <input>, <select>, and <textarea> elements when a change to the element's value is committed by the user.

[onclick]: T

A pointing device button has been pressed and released on an element.

[oncontextmenu]: T

The right button of the mouse is clicked (before the context menu is displayed).

[ondblclick]: T

A pointing device button is clicked twice on an element.

[ondrag]: T

An element or text selection is being dragged (every 350ms).

[ondragend]: T

A drag operation is being ended (by releasing a mouse button or hitting the escape key).

[ondragenter]: T

A dragged element or text selection enters a valid drop target.

[ondragleave]: T

A dragged element or text selection leaves a valid drop target.

[ondragover]: T

An element or text selection is being dragged over a valid drop target (every 350ms).

[ondragstart]: T

The user starts dragging an element or text selection.

[ondrop]: T

An element is dropped on a valid drop target.

[ondurationchange]: T

The duration attribute has been updated.

[onemptied]: T

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.

[onended]: T

Playback has stopped because the end of the media was reached.

[onerror]: T

A resource failed to load.

[onfocus]: T

An element has received focus (does not bubble).

[onformchange]: T
[onforminput]: T
[oninput]: T

The value of an element changes or the content of an element with the attribute contenteditable is modified.

[oninvalid]: T

A submittable element has been checked and doesn't satisfy its constraints.

[onkeydown]: T

A key is pressed down.

[onkeypress]: T

A key is pressed down and that key normally produces a character value (use input instead).

[onkeyup]: T

A key is released.

[onload]: T

A resource and its dependent resources have finished loading.

[onloadeddata]: T

The first frame of the media has finished loading.

[onloadedmetadata]: T

The metadata has been loaded.

[onloadstart]: T

Progress has begun.

[onmousedown]: T

A pointing device button (usually a mouse) is pressed on an element.

[onmouseenter]: T

A pointing device is moved onto the element that has the listener attached.

[onmouseleave]: T

A pointing device is moved off the element that has the listener attached.

[onmousemove]: T

A pointing device is moved over an element.

[onmouseout]: T

A pointing device is moved off the element that has the listener attached or off one of its children.

[onmouseover]: T

A pointing device is moved onto the element that has the listener attached or onto one of its children.

[onmouseup]: T

A pointing device button is released over an element.

[onmousewheel]: T
[onpause]: T

Playback has been paused.

[onplay]: T

Playback has begun.

[onplaying]: T

Playback is ready to start after having been paused or delayed due to lack of data.

[onpointercancel]: T

The pointer is unlikely to produce any more events.

[onpointerdown]: T

The pointer enters the active buttons state.

[onpointerenter]: T

Pointing device is moved inside the hit-testing boundary.

[onpointerleave]: T

Pointing device is moved out of the hit-testing boundary.

[onpointerlockchange]: T

The pointer was locked or released.

[onpointerlockerror]: T

It was impossible to lock the pointer for technical reasons or because the permission was denied.

[onpointermove]: T

The pointer changed coordinates.

[onpointerout]: T

The pointing device moved out of hit-testing boundary or leaves detectable hover range.

[onpointerover]: T

The pointing device is moved into the hit-testing boundary.

[onpointerup]: T

The pointer leaves the active buttons state.

[onprogress]: T

In progress.

[onratechange]: T

The playback rate has changed.

[onreadystatechange]: T

The readyState attribute of a document has changed.

[onreset]: T

A form is reset.

[onresize]: T

The document view has been resized.

[onscroll]: T

The document view or an element has been scrolled.

[onseeked]: T

A seek operation completed.

[onseeking]: T

A seek operation began.

[onselect]: T

Some text is being selected.

[onshow]: T

A contextmenu event was fired on/bubbled to an element that has a contextmenu attribute

[onstalled]: T

The user agent is trying to fetch media data, but data is unexpectedly not forthcoming.

[onsubmit]: T

A form is submitted.

[onsuspend]: T

Media data loading has been suspended.

[ontimeupdate]: T

The time indicated by the currentTime attribute has been updated.

[onvolumechange]: T

The volume has changed.

[onwaiting]: T

Playback has stopped because of a temporary lack of data.

[part]: T

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.

MDN Reference

[role]: T
[slot]: T

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.

MDN Reference

[spellcheck]: T

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.

MDN Reference

[style]: T

Contains CSS styling declarations to be applied to the element. Note that it is recommended for styles to be defined in a separate file or files. This attribute and the \<style> element have mainly the purpose of allowing for quick styling, for example for testing purposes.

MDN Reference

[tabindex]: T

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:

  • a negative value means that the element should be focusable, but should not be reachable via sequential keyboard navigation;
  • 0 means that the element should be focusable and reachable via sequential keyboard navigation, but its relative order is defined by the platform convention;
  • a positive value means that the element should be focusable and reachable via sequential keyboard navigation; the order in which the elements are focused is the increasing value of the tabindex. If several elements share the same tabindex, their relative order follows their relative positions in the document.

MDN Reference

[title]: T

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.

MDN Reference

[translate]: T

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:

  • empty string and yes, which indicates that the element will be translated.
  • no, which indicates that the element will not be translated.

MDN Reference

a[download]: T

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:

  • This attribute only works for same-origin URLs.
  • Although HTTP(s) URLs need to be in the same-origin, 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.
  • If the HTTP header Content-Disposition: gives a different filename than this attribute, the HTTP header takes priority over this attribute.
  • If Content-Disposition: is set to inline, Firefox prioritizes Content-Disposition, like the filename case, while Chrome prioritizes the download attribute.
a[href]: T

Contains a URL or a URL fragment that the hyperlink points to.

a[hreflang]: T

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.

a[ping]: T

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.

a[referrerpolicy]: T

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.
a[rel]: T

Specifies the relationship of the target object to the link object. The value is a space-separated list of link types.

a[target]: T

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".

a[type]: T

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.

area[accesskey]: T

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.

area[alt]: T
area[coords]: T
area[download]: T
area[href]: T
area[hreflang]: T
area[ping]: T
area[rel]: T
area[shape]: T
area[target]: T
area[type]: T
audio[autoplay]: T

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.

audio[controls]: T

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.

audio[crossorigin]: T

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.

audio[loop]: T

A Boolean attribute: if specified, the audio player will automatically seek back to the start upon reaching the end of the audio.

audio[mediagroup]: T
audio[muted]: T

A Boolean attribute that indicates whether the audio will be initially silenced. Its default value is false.

audio[preload]: T

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.
  • empty string: A synonym of the 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:

  • The autoplay attribute has precedence over preload. If autoplay is specified, the browser would obviously need to start downloading the audio for playback.
  • The browser is not forced by the specification to follow the value of this attribute; it is a mere hint.
audio[src]: T

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.

base[href]: T

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.

base[target]: T

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.

bdo[dir]: T

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.
blockquote[cite]: T

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.

body[alink]: T

Color of text for hyperlinks when selected. This method is non-conforming, use CSS color property in conjunction with the :active pseudo-class instead.

body[background]: T

URI of a image to use as a background. This method is non-conforming, use CSS background property on the element instead.

body[bgcolor]: T

Background color for the document. This method is non-conforming, use CSS background-color property on the element instead.

body[bottommargin]: T

The margin of the bottom of the body. This method is non-conforming, use CSS margin-bottom property on the element instead.

body[leftmargin]: T

The margin of the left of the body. This method is non-conforming, use CSS margin-left property on the element instead.

body[link]: T

Color of text for unvisited hypertext links. This method is non-conforming, use CSS color property in conjunction with the :link pseudo-class instead.

body[onafterprint]: T

Function to call after the user has printed the document.

body[onbeforeprint]: T

Function to call when the user requests printing of the document.

body[onbeforeunload]: T

Function to call when the document is about to be unloaded.

body[onblur]: T

Function to call when the document loses focus.

body[onerror]: T

Function to call when the document fails to load properly.

body[onfocus]: T

Function to call when the document receives focus.

body[onhashchange]: T

Function to call when the fragment identifier part (starting with the hash ('#') character) of the document's current address has changed.

body[onlanguagechange]: T

Function to call when the preferred languages changed.

body[onload]: T

Function to call when the document has finished loading.

body[onmessage]: T

Function to call when the document has received a message.

body[onoffline]: T

Function to call when network communication has failed.

body[ononline]: T

Function to call when network communication has been restored.

body[onpagehide]: T
body[onpageshow]: T
body[onpopstate]: T

Function to call when the user has navigated session history.

body[onredo]: T

Function to call when the user has moved forward in undo transaction history.

body[onresize]: T

Function to call when the document has been resized.

body[onstorage]: T

Function to call when the storage area has changed.

body[onundo]: T

Function to call when the user has moved backward in undo transaction history.

body[onunload]: T

Function to call when the document is going away.

body[rightmargin]: T

The margin of the right of the body. This method is non-conforming, use CSS margin-right property on the element instead.

body[text]: T

Foreground color of text. This method is non-conforming, use CSS color property on the element instead.

body[topmargin]: T

The margin of the top of the body. This method is non-conforming, use CSS margin-top property on the element instead.

body[vlink]: T

Color of text for visited hypertext links. This method is non-conforming, use CSS color property in conjunction with the :visited pseudo-class instead.

br[clear]: T

Indicates where to begin the next line after the break.

button[autocomplete]: T

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.

button[autofocus]: T

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.

button[disabled]: T

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.

button[form]: T

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.

button[formaction]: T

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.

button[formenctype]: T

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.

button[formmethod]: T

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.

button[formnovalidate]: T

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.

button[formtarget]: T

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.
button[name]: T

The name of the button, which is submitted with the form data.

button[type]: T

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.
button[value]: T

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.

canvas[height]: T

The height of the coordinate space in CSS pixels. Defaults to 150.

canvas[moz-opaque]: T

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.

canvas[width]: T

The width of the coordinate space in CSS pixels. Defaults to 300.

caption[align]: T

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.

col[align]: T

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 cell
  • center, centering the content in the cell
  • right, aligning the content to the right of the cell
  • justify, inserting spaces into the textual content so that the content is justified in the cell
  • char, 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.

  • To achieve the same effect as the left, center, right or justify values:
  • Do not try to set the 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.
  • If the table doesn't use a 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.
  • If the table does use a colspan attribute, the effect can be achieved by combining adequate CSS attribute selectors like [colspan=n], though this is not trivial.
  • To achieve the same effect as the char value, in CSS3, you can use the value of the char as the value of the text-align property Unimplemented.
col[span]: T
colgroup[align]: T

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 cell
  • center, centering the content in the cell
  • right, aligning the content to the right of the cell
  • justify, inserting spaces into the textual content so that the content is justified in the cell
  • char, 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.

  • To achieve the same effect as the left, center, right or justify values:
  • Do not try to set the 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.
  • If the table doesn't use a 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.
  • If the table does use a colspan attribute, the effect can be achieved by combining adequate CSS attribute selectors like [colspan=n], though this is not trivial.
  • To achieve the same effect as the char value, in CSS3, you can use the value of the char as the value of the text-align property Unimplemented.
colgroup[span]: T
dd[nowrap]: T

If the value of this attribute is set to yes, the definition text will not wrap. The default value is no.

del[cite]: T

A URI for a resource that explains the change (for example, meeting minutes).

del[datetime]: T

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.

details[open]: T

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.

dialog[open]: T

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.

embed[height]: T

The displayed height of the resource, in CSS pixels. This must be an absolute value; percentages are not allowed.

embed[src]: T

The URL of the resource being embedded.

embed[type]: T

The MIME type to use to select the plug-in to instantiate.

embed[width]: T

The displayed width of the resource, in CSS pixels. This must be an absolute value; percentages are not allowed.

fieldset[disabled]: T

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.

fieldset[form]: T

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.

fieldset[name]: T

The name associated with the group.

Note: The caption for the fieldset is given by the first \<legend> element nested inside it.

form[accept-charset]: T

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.

form[accept]: T

A comma-separated list of content types that the server accepts.

Usage note: This attribute has been removed in HTML5 and should no longer be used. Instead, use the accept attribute of the specific \<input> element.

form[action]: T

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.

form[autocapitalize]: T

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 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.
form[autocomplete]: T

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.

form[enctype]: T

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.

form[method]: T

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.

form[name]: T

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.

form[novalidate]: T

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.

form[target]: T

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.
  • iframename: The response is displayed in a named \<iframe>.

HTML5: This value can be overridden by a formtarget attribute on a \<button> or \<input> element.

head[profile]: T

The URIs of one or more metadata profiles, separated by white space.

hr[align]: T

Sets the alignment of the rule on the page. If no value is specified, the default value is left.

hr[color]: T

Sets the color of the rule through color name or hexadecimal value.

hr[noshade]: T

Sets the rule to have no shading.

hr[size]: T

Sets the height, in pixels, of the rule.

hr[width]: T

Sets the length of the rule on the page through a pixel or percentage value.

html[manifest]: T

Specifies the URI of a resource manifest indicating resources that should be cached locally. See Using the application cache for details.

html[version]: T

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.

html[xmlns]: T

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.

iframe[allow]: T

Specifies a feature policy for the \<iframe>.

iframe[allowfullscreen]: T

Set to true if the \<iframe> can activate fullscreen mode by calling the requestFullscreen() method.

iframe[allowpaymentrequest]: T

Set to true if a cross-origin \<iframe> should be allowed to invoke the Payment Request API.

iframe[csp]: T

A Content Security Policy enforced for the embedded resource. See HTMLIFrameElement.csp for details.

iframe[height]: T

The height of the frame in CSS pixels. Default is 150.

iframe[importance]: T

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.

iframe[name]: T

A targetable name for the embedded browsing context. This can be used in the target attribute of the \<a>, \<form>, or \<base> elements; the formtarget attribute of the \<input> or \<button> elements; or the windowName parameter in the window.open() method.

iframe[referrerpolicy]: T

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.
iframe[sandbox]: T

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:

  • When the embedded document has the same origin as the embedding page, it is strongly discouraged to use both 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.
  • Sandboxing is useless if the attacker can display content outside a sandboxed 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.
  • The sandbox attribute is unsupported in Internet Explorer 9 and earlier.
iframe[seamless]: T
iframe[src]: T

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.

iframe[srcdoc]: T

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.

iframe[width]: T

The width of the frame in CSS pixels. Default is 300.

img[alt]: T

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.

img[crossorigin]: T

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:

img[decoding]: T

Provides an image decoding hint to the browser. The allowed values are:

img[height]: T

The intrinsic height of the image in pixels.

img[importance]: T

Indicates the relative importance of the resource. Priority hints are delegated using the values:

img[intrinsicsize]: T

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

img[ismap]: T

This Boolean attribute indicates that the image is part of a server-side map. If so, the precise coordinates of a click are sent to the server.

Note: This attribute is allowed only if the \<img> element is a descendant of an \<a> element with a valid href attribute.

img[referrerpolicy]: T

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.
img[sizes]: T

A list of one or more strings separated by commas indicating a set of source sizes. Each source size consists of:

  1. a media condition. This must be omitted for the last item.
  2. a source size value.

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.

img[src]: T

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.

img[srcset]: T

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:

  1. a URL to an image,
  2. optionally, whitespace followed by one of:
  • A width descriptor, or a positive integer directly followed by 'w'. The width descriptor is divided by the source size given in the sizes attribute to calculate the effective pixel density.
  • A pixel density descriptor, which is a positive floating point number directly followed by '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.

img[usemap]: T

The partial URL (starting with '#') of an image map associated with the element.

Note: You cannot use this attribute if the \<img> element is a descendant of an \<a> or \<button> element.

img[width]: T

The intrinsic width of the image in pixels.

input[accept]: T
input[alt]: T
input[autocomplete]: T
input[autofocus]: T
input[checked]: T
input[dirname]: T
input[disabled]: T
input[form]: T
input[formaction]: T
input[formenctype]: T
input[formmethod]: T
input[formnovalidate]: T
input[formtarget]: T
input[height]: T
input[inputmode]: T
input[list]: T
input[max]: T
input[maxlength]: T
input[min]: T
input[minlength]: T
input[multiple]: T
input[name]: T
input[pattern]: T
input[placeholder]: T
input[readonly]: T
input[required]: T
input[size]: T
input[src]: T
input[step]: T
input[type]: T
input[value]: T
input[width]: T
ins[cite]: T

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.

ins[datetime]: T

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.

label[for]: T

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.

label[form]: T

The \<form> element with which the label is associated (its form owner). If specified, the value of the attribute is the id of a \<form> element in the same document. This lets you place label elements anywhere within a document, not just as descendants of their form elements.

li[type]: T

This character attribute indicates the numbering type:

  • a: lowercase letters
  • A: uppercase letters
  • i: lowercase Roman numerals
  • I: uppercase Roman numerals
  • 1: numbers

This 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.

li[value]: T

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.

link[as]: T

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.

link[crossorigin]: T

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.

link[href]: T

This attribute specifies the URL of the linked resource. A URL can be absolute or relative.

link[hreflang]: T

This attribute indicates the language of the linked resource. It is purely advisory. Allowed values are determined by BCP47. Use this attribute only if the href attribute is present.

link[importance]: T

Indicates the relative importance of the resource. Priority hints are delegated using the values:

link[integrity]: T

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.

link[media]: T

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:

  • In HTML 4, this can only be a simple white-space-separated list of media description literals, i.e., media types and groups, where defined and allowed as values for this attribute, such as print, screen, aural, braille. HTML5 extended this to any kind of media queries, which are a superset of the allowed values of HTML 4.
  • Browsers not supporting CSS3 Media Queries won't necessarily recognize the adequate link; do not forget to set fallback links, the restricted set of media queries defined in HTML 4.
link[referrerpolicy]: T

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.
link[rel]: T

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.

link[sizes]: T

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.
  • a white-space separated list of sizes, each in the format _\<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.

link[title]: T

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.

link[type]: T

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.

map[name]: T

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.

meta[charset]: T

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:

  • Authors are encouraged to use UTF-8.
  • Authors should not use ASCII-incompatible encodings to avoid security risk: browsers not supporting them may interpret harmful content as HTML. This happens with the 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)

  • Authors must not use CESU-8, UTF-7, BOCU-1 and/or SCSU as cross-site scripting attacks with these encodings have been demonstrated.
  • Authors should not use UTF-32 because not all HTML5 encoding algorithms can distinguish it from UTF-16.

Notes:

  • The declared character encoding must match the one the page was saved with to avoid garbled characters and security holes.
  • The \<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.
  • This \<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.
  • It is strongly recommended to define the character encoding. If a page's encoding is undefined, cross-scripting techniques are possible, such as the UTF-7 fallback cross-scripting technique.
  • The \<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.
meta[content]: T

This attribute contains the value for the http-equiv or name attribute, depending on which is used.

meta[http-equiv]: T

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:
  • The number of seconds until the page should be reloaded - only if the content attribute contains a positive integer.
  • The number of seconds until the page should redirect to another - only if the 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.

meta[name]: T

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:

  • Some browsers support the deprecated values of always, default, and never for referrer.
  • Dynamically inserting \<meta name="referrer"> (with document.write or appendChild) makes the referrer behaviour unpredictable.
  • When several conflicting policies are defined, the no-referrer policy is applied.

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

Google

noodp

Prevents using the Open Directory Project description, if any, as the page description in search engine results.

Google, Yahoo, Bing

noarchive

Requests the search engine not to cache the page content.

Google, Yahoo, Bing

nosnippet

Prevents displaying any description of the page in search engine results.

Google, Bing

noimageindex

Requests this page not to appear as the referring page of an indexed image.

Google

nocache

Synonym of noarchive.

Bing

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:

  • Though unstandardized, this declaration is respected by most mobile browsers due to de-facto dominance.
  • The default values may vary between devices and browsers.
  • To learn about this declaration in Firefox for Mobile, see this article.
meta[scheme]: T

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.

meter[form]: T

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.

meter[high]: T

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.

meter[low]: T

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.

meter[max]: T

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.

meter[min]: T

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.

meter[optimum]: T

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.

meter[value]: T

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.

object[archive]: T

A space-separated list of URIs for archives of resources for the object.

object[border]: T

The width of a border around the control, in pixels.

object[classid]: T

The URI of the object's implementation. It can be used together with, or in place of, the data attribute.

object[codebase]: T

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.

object[codetype]: T

The content type of the data specified by classid.

object[data]: T

The address of the resource as a valid URL. At least one of data and type must be defined.

object[declare]: T

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.

object[form]: T

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.

object[height]: T

The height of the displayed resource, in CSS pixels. -- (Absolute values only. NO percentages)

object[name]: T

The name of valid browsing context (HTML5), or the name of the control (HTML 4).

object[standby]: T

A message that the browser can show while loading the object's implementation and data.

object[tabindex]: T

The position of the element in the tabbing navigation order for the current document.

object[type]: T

The content type of the resource specified by data. At least one of data and type must be defined.

object[typemustmatch]: T

This Boolean attribute indicates if the type attribute and the actual content type of the resource must match to be used.

object[usemap]: T

A hash-name reference to a \<map> element; that is a '#' followed by the value of a name of a map element.

object[width]: T

The width of the display resource, in CSS pixels. -- (Absolute values only. NO percentages)

ol[compact]: T

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%.

ol[reversed]: T

This Boolean attribute specifies that the items of the list are specified in reversed order.

ol[start]: T

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.

ol[type]: T

Indicates the numbering type:

  • 'a' indicates lowercase letters,
  • 'A' indicates uppercase letters,
  • 'i' indicates lowercase Roman numerals,
  • 'I' indicates uppercase Roman numerals,
  • and '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.

optgroup[disabled]: T

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.

optgroup[label]: T

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.

option[disabled]: T

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.

option[label]: T

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.

option[selected]: T

If present, this Boolean attribute indicates that the option is initially selected. If the \<option> element is the descendant of a \<select> element whose multiple attribute is not set, only one single \<option> of this \<select> element may have the selected attribute.

option[value]: T

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.

output[for]: T

A space-separated list of other elements’ ids, indicating that those elements contributed input values to (or otherwise affected) the calculation.

output[form]: T

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.

output[name]: T

The name of the element, exposed in the HTMLFormElement API.

param[name]: T

Name of the parameter.

param[type]: T

Only used if the valuetype is set to "ref". Specifies the MIME type of values found at the URI specified by value.

param[value]: T

Specifies the value of the parameter.

param[valuetype]: T

Specifies the type of the value attribute. Possible values are:

  • data: Default value. The value is passed to the object's implementation as a string.
  • ref: The value is a URI to a resource where run-time values are stored.
  • object: An ID of another \<object> in the same document.
pre[cols]: T

Contains the preferred count of characters that a line should have. It was a non-standard synonym of width. To achieve such an effect, use CSS width instead.

pre[width]: T

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.

pre[wrap]: T

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.

progress[max]: T

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.

progress[value]: T

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.

q[cite]: T

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.

script[async]: T

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.

script[charset]: T
script[crossorigin]: T

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.

script[defer]: T

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.

script[integrity]: T

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.

script[nomodule]: T

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.

script[nonce]: T

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.

script[referrerpolicy]: T

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.

script[src]: T

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.

script[text]: T

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.

script[type]: T

This attribute indicates the type of script represented. The value of this attribute will be in one of the following categories:

  • Omitted or a JavaScript MIME type: For HTML5-compliant browsers this indicates the script is JavaScript. HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type. In earlier browsers, this identified the scripting language of the embedded or imported (via the 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.
  • Any other value: The embedded content is treated as a data block which won't be processed by the browser. Developers must use a valid MIME type that is not a JavaScript MIME type to denote data blocks. The 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).

select[autocomplete]: T

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.

select[autofocus]: T

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.

select[disabled]: T

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.

select[form]: T

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.

select[multiple]: T

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.

select[name]: T

This attribute is used to specify the name of the control.

select[required]: T

A Boolean attribute indicating that an option with a non-empty string value must be selected.

select[size]: T

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.

source[media]: T

Media query of the resource's intended media; this should be used only in a \<picture> element.

source[sizes]: T

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.

source[src]: T

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.

source[srcset]: T

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:

  1. one URL to an image,
  2. a width descriptor, that is a positive integer directly followed by 'w'. The default value, if missing, is the infinity.
  3. a pixel density descriptor, that is a positive floating number directly followed by '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.

source[type]: T

The MIME-type of the resource, optionally with a codecs parameter. See RFC 4281 for information about how to specify codecs.

style[media]: T

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.

style[nonce]: T

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.

style[scoped]: T
style[title]: T

This attribute specifies alternative style sheet sets.

style[type]: T

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.

table[align]: T

This enumerated attribute indicates how the table must be aligned inside the containing document. It may have the following values:

  • left: the table is displayed on the left side of the document;
  • center: the table is displayed in the center of the document;
  • right: the table is displayed on the right side of the document.

Usage Note

  • Do not use this attribute, as it has been deprecated. The \<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.
  • Prior to Firefox 4, Firefox also supported the middle, absmiddle, and abscenter values as synonyms of center, in quirks mode only.
table[border]: T
tbody[align]: T

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 cell
  • center, centering the content in the cell
  • right, aligning the content to the right of the cell
  • justify, inserting spaces into the textual content so that the content is justified in the cell
  • char, 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.

  • To achieve the same effect as the left, center, right or justify values, use the CSS text-align property on it.
  • To achieve the same effect as the char value, in CSS3, you can use the value of the char as the value of the text-align property Unimplemented.
td[abbr]: T

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.

td[align]: T

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.

  • To achieve the same effect as the left, center, right or justify values, apply the CSS text-align property to the element.
  • To achieve the same effect as the char value, give the text-align property the same value you would use for the char. Unimplemented in CSS3.
td[axis]: T

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.

td[bgcolor]: T

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.

td[colspan]: T
td[headers]: T
td[rowspan]: T
textarea[autocapitalize]: T

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.
textarea[autocomplete]: T

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>.

textarea[autofocus]: T

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.

textarea[cols]: T

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.

textarea[dirname]: T
textarea[disabled]: T

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.

textarea[form]: T

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.

textarea[inputmode]: T
textarea[maxlength]: T

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.

textarea[minlength]: T

The minimum number of characters (unicode code points) required that the user should enter.

textarea[name]: T

The name of the control.

textarea[placeholder]: T

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.

textarea[readonly]: T

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.

textarea[required]: T

This attribute specifies that the user must fill in a value before submitting a form.

textarea[rows]: T

The number of visible text lines for the control.

textarea[spellcheck]: T

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.
textarea[wrap]: T

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.

tfoot[align]: T

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 cell
  • center, centering the content in the cell
  • right, aligning the content to the right of the cell
  • justify, inserting spaces into the textual content so that the content is justified in the cell
  • char, 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.

  • To achieve the same effect as the left, center, right or justify values, use the CSS text-align property on it.
  • To achieve the same effect as the char value, in CSS3, you can use the value of the char as the value of the text-align property Unimplemented.
th[abbr]: T

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.

th[align]: T

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.

  • To achieve the same effect as the left, center, right or justify values, apply the CSS text-align property to the element.
  • To achieve the same effect as the char value, give the text-align property the same value you would use for the char. Unimplemented in CSS3.
th[axis]: T

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.

th[bgcolor]: T

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.

th[colspan]: T
th[headers]: T
th[rowspan]: T
th[scope]: T
th[sorted]: T
thead[align]: T

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 cell
  • center, centering the content in the cell
  • right, aligning the content to the right of the cell
  • justify, inserting spaces into the textual content so that the content is justified in the cell
  • char, 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.

  • To achieve the same effect as the left, center, right or justify values, use the CSS text-align property on it.
  • To achieve the same effect as the char value, in CSS3, you can use the value of the char as the value of the text-align property Unimplemented.
time[datetime]: T

This attribute indicates the time and/or date of the element and must be in one of the formats described below.

tr[align]: T

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 ",").

track[default]: T

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.

track[kind]: T

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
  • Subtitles provide translation of content that cannot be understood by the viewer. For example dialogue or text that is not English in an English language film.
  • Subtitles may contain additional content, usually extra background information. For example the text at the beginning of the Star Wars films, or the date, time, and location of a scene.
  • captions
  • Closed captions provide a transcription and possibly a translation of audio.
  • It may include important non-verbal information such as music cues or sound effects. It may indicate the cue's source (e.g. music, text, character).
  • Suitable for users who are deaf or when the sound is muted.
  • descriptions
  • Textual description of the video content.
  • Suitable for users who are blind or where the video cannot be seen.
  • chapters
  • Chapter titles are intended to be used when the user is navigating the media resource.
  • metadata
  • Tracks used by scripts. Not visible to the user.
track[label]: T

A user-readable title of the text track which is used by the browser when listing available text tracks.

track[src]: T

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.

track[srclang]: T

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.

ul[compact]: T

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%.

video[autoplay]: T

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.

video[controls]: T
video[crossorigin]: T
video[height]: T
video[loop]: T
video[mediagroup]: T
video[muted]: T
video[poster]: T
video[preload]: T
video[src]: T
video[width]: T