The 132 Content Attributes of HTML

In HTML, an attribute modifies its element. The element's start tag specifies the set of space-separated attributes that modify the element's content. Each attribute always has a name part and most times a value part.

class attribute

The class attribute relates an identifier to an HTML element

The value must be a set of space-separated identifiers.

<html-element class="[ID ID etc]">

id attribute

The id attribute relates a unique identifier on an HTML element

The id attribute relates an identifier that is unique to the document on an HTML element

The value must be a non-empty unique identifier

<html-element id="attribute-[ID]">

lang attribute

The lang attribute relates the primary content language on an HTML element. It's recommended to specify a lang atribute on the Content Root

The value must be either a valid BCP 47 language tag or an empty string. The empty string indicates an unknown language

<html-element lang="['' | BCP-47-language-tag]">

charset attribute

The charset attribute relates the document character encoding on a meta element

The value must be "utf-8".

<meta charset="utf-8">

dir attribute

The dir attribute relates the content direction on an HTML element

The value is one of the following keywords:

ltr

The ltr keyword isolates a text with a left-to-right direction

rtl

The rtl keyword isolates a text with a right-to-left direction

auto

The auto keyword isolates a text with an auto-generated direction

The default value on a bdi element is the auto value.

The default for both missing value and invalid value is the undefined state

<html-element dir="[ltr|rtl|auto]">

translate attribute

The translate attribute relates the content translatable status on an HTML element

The value is one of the following keywords:

yes

The yes keyword enables the translation of content and applicable attributes

no

The no keyword disables translation on content and translatable attributes

The default for both missing value and invalid value are inherited from a parent or a user agent default.

<html-element translate="[yes|no]">

title attribute

The title attribute relates the following:

  • The subject of a definition on a dfn element

    The value must be a text

    <dfn title="[text]"></dfn>
    
  • The subject of a definition on an abbr element. But, the element must be the only child to a dfn element that has no title attribute

    The value must be a text

    <dfn>
      <abbr title="[text]"></abbr>
    </dfn>
    
  • An expansion of an abbreviation on an abbr element

    The value must be a text

    <abbr title="[expansion-text]"></abbr>
    
  • The name of a CSS set on the following elements: link, and style

    Note: The title attribute on a link element requires the rel attribute to contain the stylesheet keyword

    The value must be a text

    <style title="[CSS-set-name]"></style>
    
  • The description of a pattern on an input element with a pattern attribute

    The value must be a text

    <input pattern="[regex]" title="[description]"]>
    
  • An advisory information on other HTML elements

    The value must be a text.

    <other-html-element title="[advisory-information]">
    

rel attribute

The rel attribute relates a resource connection type on the following elements: link, a, area, and form.

The value must be a set of unique space-separated tokens. Each token is based on an element as follows:

  • The supported tokens on: an a element, an area element, and a form element; are as follows:

    noferrer
    The noreferrer token avoids sending referrer information to the external resource
    noopener
    The noopener token removes the auxiliary browsing context of a new window that opens the external resource
    opener
    The opener token includes the auxiliary browsing context of a new window that opens the external resource
    <applicable-html-element rel="[token token etc.]">
    
  • The supported rel tokens on a link element are of 2 groups.

    The following first set of tokens extends a link element: alternate, next, search, icon, manifest, pingback, stylesheet, preload, and modulepreload

    The following second set of follows applies to icon, manifest, pingback, and stylesheet tokens.

    dns-prefetch

    The dns-prefetch token relates for an early DNS lookup on the resource.

    preconnect

    The preconnect token relates for an early connection to the resource.

    prefetch

    The prefetch token relates at fetching the resource for future navigations.

    <link rel="[dns-prefetch|preconnect|prefetch] [icon|stylesheet|manifest|pingback|icon]" href="[URL]">
    

type attribute

The type attribute relates the following:

  • Resource format on the following elements: link, a, embed, object, and source.

    Notes
    • On a source element whose parent is a picture element, the type attribute helps a user agent skip to the next source element if it does not support the given format

    • On a source element whose parent element is an audio element or a video element, it helps a user agent determine if it can play the media before fetching it

    The value must be a MIME Type

    <applicable-html-element type="[MIME Type]">
    
  • List Marker on an ol element

    The value is one of the following keywords:

    1

    The number one character keyword specifies decimal numbers as the marker type for an ordered list.

    a

    The lowercase letter a character keyword specifies the lowercase Latin alphabet as the marker type for an ordered list

    A

    The uppercase letter A character keyword specifies an uppercase Latin alphabet as the marker type for an ordered list

    i

    The lowercase letter i character keyword specifies a lowercase Roman numerals as the marker type for an ordered list

    I

    The uppercase letter I character keyword specifies an uppercase roman numerals as the marker type for an ordered list

    The default for both missing value and invalid value is the number 1 character keyword

    <ol type="[1|a|A|i|I]"></ol>
    
  • Data Type on an input element

    The value is one of the following keywords: hidden, text, search, tel, url, email, password, date, month, week, time, datetime-local, number, range, color, checkbox, radio, file, submit, image, reset, and button.

    The default for both missing value and invalid value is the text keyword

    <input type="[keyword]">
    
  • Button Type on a button element

    The value is one of the following keywords: submit, reset, button,

    The default for both missing value and invalid value is the submit keyword

  • Script Type on a script element.

    The value must be one of the following keywords: module, importmap, and a MIME type

    <script type="[module|importmap|MIME-Type]"></script>
    

hreflang attribute

The hreflang attribute relates the language of a resource on the following elements: link, and a.

The value must be a valid BCP-47 language tag

<applicable-html-element hreflang="[BCP-47-language-tag]">

as attribute

The as attribute relates a preloaded resource on a link element.

The value is one of the following tokens: fetch, audio, audioworklet, document, embed, font, frame, iframe, image, json, manifest, object, paintworklet, report, script, serviceworker, sharedworker, style, track, video, webidentity, worker, and xslt.

The default for both missing value and invalid value is an error state. But, The default missing value of a link element with a rel attribute having modulepreload keyword is the script value.

<link as="[resource-model]">

blocking attribute

The blocking relates a blocked operation while fetching a resource on the following elements: link, style, and script.

The value must be the render keyword.

<applicable-html-element blocking="render">

nonce attribute

The nonce attribute relates a one-time number to allow a fetch operation on an HTML element

The value must be a text

<html-element nonce="[text]">

fetchpriority attribute

The fetchpriority attribute relates a fetch priority hint for the resource on the following elements: link, script, and img.

The value is one of the following keywords:

high

The high keyword signals a high-priority fetch relative to other resources with the same destination

low

The low keyword signals a low-priority fetch relative to other resources with the same destination

auto

The auto keyword signals an auto-priority fetch relative to other resources with the same destination

The default for both missing value and invalid values is the auto keyword

<applicable-html-element fetchpriority="[auto|low|high]">

crossorigin attribute

The crossorigin attribute relates the status of cross-origin sharings on the following elements: script, link, img, audio, and video.

The value is one of the following keywords:

anonymous

The anonynous keyword sends a cross-origin request without a credential

use-credentials

The use-credentials keyword sends a cross-origin request with a credential.

The default missing value is the No CORS state. And, the default invalid value is the anonymous keyword.

<applicable-html-element crossorigin="[anonymous|use-credentials]">

referrerpolicy attribute

The referrerpolicy relates a referrer for the following:

  • fetching a resource on the following elements: link, script, and iframe.

  • following a hyperlink on the following elements: a, and area.

The value is one following keywords called policies:

no-referrer

The `no-referrer` policy sends no Referrer URL along with any request

unsafe-url

The unsafe-url policy sends a Referrer URL along with any request

no-referrer-when-downgrade

The no-referrer-when-downgrade policy does either of the following:

origin

The origin policy sends a URL origin along with any request

strict-origin

This origin does either of the following:

same-origin

This policy sends either of the following:

  • A Referrer URL along with same-origin requests

  • No Referrer URL along with cross-origin requests

origin-when-cross-origin

This policy sends either of the following:

  • A Referrer URL along with same-origin requests

  • A URL origin along with cross-origin request

strict-origin-when-cross-origin

The strict-origin-when-cross-origin policy does the origin-when-cross-origin policy to equal or more secure protocols.

""

The empty string policy sends an inherited referrer policy. If none, it does the no-referrer-when-downgrade policy.

Note: A Referrer URL is a URL without the following: fragment, username, and password

The default for both missing value and invalid value is the empty string policy

<applicable-html-element referrerpolicy="[policy-token]">

integrity attribute

The integrity attribute relates a manipulation check on the following elements: link, and script.

The value must be a text

<applicable-html-element integrity="[text]">

async attribute

The async boolean attribute relates an execution of a script when it's available on a script element

<script async></script>

defer attribute

The defer boolean attribute relates an execution of a script when the DOM is ready on a script element

<script defer></script>

nomodule attribute

The nomodule boolean attribute relates a module fallback on a script element

<script nomodule></script>

media attribute

The media attribute relates a device restriction on the following elements: link, style, meta, and source.

The value must be a valid media query list

<applicable-html-element media="[media-query-list]"]>

color attribute

The color attribute relates an icon color for launchers on a link element.

The value must be a CSS color production.

<link color=[css-color-value]>

http-equiv attribute

The http-equiv attribute relates a pragma directive key on a meta element

The value is one of the following keywords: content-type, default-style, refresh, and content-security-policy.

<meta http-equiv="[keyword]">

content attribute

The content attribute relates the value of a document metadata key or pragma directive key on a meta element

The value must be one of the following for the respective key:

shadowrootmode attribute

The shadowrootmode attribute relates access to declarative shadow root on a template element

The value is one of the following keywords:

open

The open keyword relates the template element as an open declarative shadow root

closed

The closed keyword relates the template element as a closed declarative shadow root

The default for both missing value and invalid value is a none state.

<template shadowrootmode="[open|closed]"></template>

shadowrootdelegatesfocus attribute

The shadowrootdelegatesfocus boolean attribute relates a focus delegation to a declarative shadow root on a template element.

<template shadowrootdelegatesfocus></template>

is attribute

The is attribute relates an extended custom element on a standard HTML element

The value must be the name of an extended custom element

<standard-html-element is="[name-of-extended-custom-element]">

slot attribute

The slot attribute relates a slot element on an HTML element

The value must be the name of a slot element

<html-element slot="[valid-slot-element-name]">

style attribute

The style attribute relates CSS declarations on an HTML element

The value must be a text content that gives a conformant style sheet

<html-element style="[css-declarations]">

data-* attribute

The data-* attribute relates a simple data store on an HTML element

The value must be a text content that conforms to the data type.

<html-element data-[name]="[text-value]">

usemap attribute

The usemap attribute relates a map element on an img element

The value must be the hash-name of a map element

<img usemap="#[name]">

ismap attribute

The ismap boolean attribute relates access to a server-side image map on an img element

<img ismap>

srcset attribute

The srcset attribute relates an address of a responsive image resource on the following elements: source, and img.

The value must be one or more comma-separated Image Candidate Strings (IMS). Each IMS specifies a space-separation of the following:

  • An image address that must be a valid URL address
  • Either of the following unique descriptor
    • A width descriptor composed of both an integer number greater than zero and a small letter "w" character. An example is 1w or 3w.

    • A pixel-density descriptor composed of both a floating-point number greater than zero and a small letter "x" character. An example is 1x and 5.8x

<applicable-html-element srcset="[IMS, IMS, etc.]">

imagesrcset attribute

The imagesrcset attribute is a synonym of the srcset attribute but on a link element

<form imagesrcset="[IMS, IMS, etc.]"></form>

src attribute

The src attribute relates an address of the resource on the following elements: input, img, audio, video, source, track, iframe, embed, and script

The value must be a valid URL address.

<applicable-html-element src="[valid-url]">

data attribute

The data attribute relates the address of a generic object resource on an object element

The value must be a valid URL address.

<object data=""></object>

loading attribute

The loading attribute relates a loading mechanism on the following elements when out of the viewport: img, and iframe.

The value is either of the following keywords:

lazy
The lazy keyword fetches a resource on conditions
eager
The eager keyword fetches a resource immediately

The default for both missing value and invalid value is the eager keyword

<applicable-html-element loading="[lazy|eager]">

decoding attribute

The decoding attribute relates an image decoding hint on an img element

The value is one of the following keywords:

sync

The sync keyword decodes an image synchronously for atomic presentation with other content

asyc

The async keyword decodes an image asynchronously to avoid delaying the presentation of other content

auto

The auto keyword relates no decoding preference

The default for both missing value and invalid value is the auto keyword

<img decoding="[auto|sync|async]">

shape attribute

The shape attribute relates a shape model on an area element

The value is one of the following keywords:

poly

The poly keyword relates a polygonal shape for an image map area

rect

The rect keyword relates a rectangular shape for an image map area

circle

The circle keyword relates a circular shape for an image map area

default

The default keyword relates the whole shape for an image map area

The default for both missing value and invalid value is the rect keyword

<area shape="[rect|poly|circle|default]">

width attribute

The width attribute relates the following:

The value is a non-negative integer that is rendered in CSS pixels.

<applicable-html-element width="[non-negative-integer]">

imagesizes attribute

The imagesizes attribute relates the wideness of a responsive image resource on a link element

The value must be a set of comma-separated tokens. Each token contains both a media-condition and a width, separated by a space.

<link sizes="[[media-condition width], [media-condition width], etc.]">

sizes attribute

The sizes attribute relates the following:

  • The wideness and highness of an icon resource on a link element

    The value must be one of the following tokens:

    • An any keyword

    • A string of 2 valid non-negative integers separated by a case-insensitive "x" character. Each number must not have a leading zero character (0).

      The first number relates the width while the second number relates the height. Both in CSS pixels

    <link sizes="[any|20x30]">
    
  • A synonym of the imagesizes attribute but on the following elements: img, and source.

    <applicable-html-element sizes="[[media-condition width], [media-condition width], etc.]">
    

height attribute

The height attribute relates the following:

The value is a non-negative integer that is rendered in CSS pixels.

<applicable-html-element height="[non-negative-integer]">

coords attribute

The coords attribute relates a freeform wideness and highness on an area element

The value must be a valid list of floating-point numbers. This number relates the coordinates of the intended shape

<area coords="[list-of-floating-point-numbers]">

alt attribute

The alt attribute relates an alternative text of an image resource on the following elements: img, area, and input.

The value must be an empty or non-empty text

<applicable-html-element alt="[text]">

poster attribute

The poster attribute relates an address of a poster image resource on a video element

The value must be a valid URL address.

<video poster="[valid-url]"></video>

preload attribute

The preload attribute relates the fetching mechanism on the following elements: audio, and video.

The value is one of the following keywords:

none

The none keyword hints at no download of the resource

metadata

The metadata keyword hints at fetching the metadata of a media resource

auto

The auto keyword hints at fetching the whole of a media resource

The default for both missing value and invalid value is browser-specific but metadata keyword is recommended.

<applicable-html-element preload="[metadata|none|auto]">

autoplay attribute

The autoplay boolean attribute relates an automatic play functionality on the following elements: audio, and video.

<applicable-html-element autoplay>

loop attribute

The loop boolean attribute relates an automatic repeat functionality on the following elements: audio, and video.

<applicable-html-element loop>

muted attribute

The muted boolean attribute relates a no-sound functionality on the following elements: audio, and video.

<applicable-html-element muted>

playsinline attribute

The playsinline boolean attribute relates an inline play functionality on a video element

<applicable-html-element playsinline>

srclang attribute

The srclang attribute relates the primary language of a timed text resource on a track element

The value must be a valid BCP 47 language tag

<track srclang="[BCP-47-language-tag]">

default attribute

The default boolean attribute relates an initial preference pending user's choice on a track element

<track default>

controls attribute

The controls boolean attribute relates a preference for the user agent's control buttons on the following elements: audio, and video.

<applicable-html-element controls>

kind attribute

The kind attribute relates a sort of text track resource on a track element

The value is one of the following keywords:

subtitles
The subtitles keyword specifies the resource as an alternative text for the sound of an audio or a video element
captions
The captions keyword specifies the resource as an alternative text for the sound and sound effects of either an audio element, or a video element
descriptions
The description keyword specifies the resource as an alternative text for the sound and visuals of a video element
chapters
The chapters keyword specifies the resource as a list of chapters for navigation purpose
metadata
The metadata keyword specifies the resource as content for scripts

The default missing value is the subtitles keyword. And, the default invalid value is the metadata keyword.

<track kind="[subtitles|captions|descriptions|chapters|metadata]">

label attribute

The label attribute relates a user-readable title on the following elements: option, optgroup, and track.

The value must be a non-empty string.

<applicable-html-element label="[non-empty-text]">

srcdoc attribute

The srcdoc attribute relates an html document on an iframe element

The value must do the following:

  • conform to the HTML Syntax

  • escape all ampersand characters (&) and quotation mark characters (").

<iframe srcdoc="[escaped-html-document-content]"></iframe>

sandbox attribute

The sandbox attribute relates some security rules on an iframe element

The value must be an unordered set of space-separated security tokens.

<iframe sandbox="security-token security-token etc."></iframe>

allowfullscreen attribute

The allowfullscreen boolean relates a fullscreen permission on an iframe element

<iframe allowfullscreen></iframe>

allow attribute

The allow attribute relates a permission policy on an iframe element

The value must be a permissions-policy.

<iframe allow="[permission-policy]"></iframe>

draggable attribute

The draggable attribute relates a drag functionality on an HTML element

The value is one of the following keywords:

true

The true keyword indicates that an element can be dragged

false

The false keyword indicates that an element cannot be dragged

The default for both missing value and invalid value is an Auto State.

<html-element draggable="[true|false]">

contenteditable attribute

The contenteditable attribute relates an edit functionality on an HTML element

The value is one of the following keywords:

true

The true keyword enables rich-text editing

false

The false keyword disables the ability to edit content of an element

plaintext-only

The plaintext-only keyword enables plain-text editing

The default for both missing value and invalid value is inherited from the parent up to the false keyword

<html-element contenteditable="[false|true|plaintext-only]">

for attribute

The for attribute relates the following:

  • A Content Form on a label element

    The value must be the ID of that Content Form

    <label for="Content-Form-ID"></label>
    
  • A Content Form used for a result on an output element

    The value must be a set of unique space-separated IDs of a Content Form

    <output for="[Content-Form-IDs]">[result]</output>
    

name attribute

The name attribute relates the following:

dirname attribute

The dirname attribute relates a form-unique direction identifier on the following elements: textarea, and input.

The value must be an ID that is unique to all elements in a form submission

<applicable-html-element dirname="[ID]">

form attribute

The form attribute relates a form element on the following elements: textarea, select, input, button, output, object, and fieldset.

The value must be the ID of a form element

<applicable-html-element form="[form-element-ID]">

accept-charset attribute

The accept-charset attribute relates the character encodings for the submission of Content Forms on a form element

The value must be "utf-8"

<form accept-charset="utf-8"></form>

action attribute

The action attribute relates a handler for the submission of Content Forms on a form element

The value must be a valid URL address.

<form action="[valid-url]"></form>

formaction attribute

The formaction attribute relates an higher precedence action attribute but on the following elements: button, and input.

<applicable-html-element formaction="[valid-url]">

enctype attribute

The enctype attribute relates an encoding for submission of Content Forms on a form element

The value is one of 3 formenctype keywords

The default missing value is nothing. And, the default invalid value is the application/x-www-form-urlencoded keyword

<form formenctype="[enctype-keyword]">[Content Forms]</form>

formenctype attribute

The formenctype attribute relates an higher precedence enctype attribute but on the following elements: button, and input.

<applicable-html-element formenctype="[enctype-keyword]">

method attribute

The method attribute relates a transfer mechanism for the submission of Content Forms on a form element

The value is one of the following keywords:

get

The get keyword submits the Content Forms with an HTTP GET method

post

The post keyword submit the Content Forms with an HTTP POST method

dialog

The dialog keyword do not submit the Content Forms but closes the dialog box in which the form finds itself

<form method="[get|post|dialog]"></form>

formmethod attribute

The formmethod attribute relates an higher precedence method attribute but on the following elements: button, and input.

<applicable-html-element formmethod="[method-keyword]">

novalidate attribute

The novalidate boolean attribute relates a no-validation rule for the submission of Content Forms on a form element

<form novalidate></form>

formnovalidate attribute

The formnovalidate attribute relates an higher precedence novalidate attribute but on the following elements: button, and input.

<applicable-html-element formnovalidate>

target attribute

The target attribute relates a navigable on the following elements: form, a, area, and base

The value must be a valid navigatable target name or keyword.

<applicable-html-element target="[value]">

formtarget attribute

The formtarget attribute relates an higher precedence target attribute but on the following elements: button, and input.

<applicable-html-element formtarget="[value]">

autofocus attribute

The autofocus boolean attribute relates an automatic focus upon page load on an editable HTML element

<html-element autofocus>

tabindex attribute

The tabindex attribute relates a focus and a focus order on an HTML element

The value must be a valid integer

Negative integers

Numbers less than zero enables an element to be click focusable with no navigation order

0

The zero number enables an element to be click focusable with an implicit navigation order

Positive Integers

Numbers greater than zero enables an element to be click focusable with an explicit navigation order

<html-element tabindex="[integer]">

accesskey attribute

The accesskey relates an identifier to help user agents create a keyboard shortcut on an HTML element

The value must be an ordered set of unique space-separated single-length code-point strings

<html-element accesskey="[strings]">

enterhintkey attribute

The enterhintkey attribute relates a label for the enter key in a virtual keyboard on an HTML element

The value is one of the following keywords:

enter

The enter keyword relates an "enter" label or a familiar icon. This depicts a control that inserts a new line in a text field

done

The done keyword relates a "done" label. This depicts a control that wrap up action on the text field

go

The go keyword relates a "go" label. This depicts a control that goes to the target of the typed text

next

The next keyword relates a "next" label. This depict a control that takes a user to the next text field

previous

The previous keyword relates a "previous" label. This depicts a control that takes the user to the previous text field

search

The search keyword relates a "search" label. This depicts a control that takes the user to the search results of the typed text

send

The send keyword relates a "send" label. This depicts a control that delivers the text to its target

The default for both missing value and invalid value is automatically determined by the user agent

<editable-html-element enterhintkey="[enter|done|go|next|previous|search|send]">

inputmode attribute

The inputmode attribute relates a type of virtual keyboard to edit content on an editable HTML element

The value is one of the following keywords:

none

The none keyword hints at no display of the browser's virtual keyboard

text

The text keyword hints at a virtual keyboard optimized to write text in user's locale

tel

The tel keyword hints at a virtual keyboard optimized to write telephone numbers in user's locale

url

The url keyword hints at a virtual keyboard optimized to write URL addresses in user's locale

email

The email keyword hints at a virtual keyboard optimized to write Email addresses in user's locale

numeric

The numeric keyword hints at a virtual keyboard optimized to write numeric inputs

decimal

The decimal keyword hints at a virtual keyboard optimized to write fractional numeric inputs

search

The search keyword hints at a virtual keyboard optimized to write search terms

The default for both missing value and invalid value is auto.

<editable-html-element inputmode="[none|text|tel|url|email|numeric|decimal|search]">

spellcheck attribute

The spellcheck attribute relates a spelling and grammar audit on an editable HTML element

The value must be one of the following keywords:

true

The true keyword indicates that spelling and grammar will be checked

false

The false keyword indicates that spelling and grammar will not be checked

The default for both missing value and invalid value is the default state

<editable-html-element spellcheck="[true|false]">

autocomplete attribute

The autocomplete attribute relates automatic value prediction functionality on the following elements: textarea, select, input, form.

Note: The autocomplete attribute relates the meaning of the given value on an input element with a type attribute of hidden value

The value is one of the following tokens:

off

The off token indicates no automatic completion on the content form.

Note: This token is not available for an input element with the type attribute of hidden value.

on

The on token indicates there will be unguided value predictions for the content form

This token is not available for an input element with the type attribute of hidden value.

Autofill detail token

An autofill detail token indicates the specific type of value to predict for the content form.

This token is not available on a form element.

The default for both missing value and invalid value is the on keyword

<applicable-html-element autocomplete="[token]">

list attribute

The list attribute relates a datalist element for value suggestions on an input element

The value must be an ID of a datalist element

<input list="[datalist-id]">

autocapitalize attribute

The autocapitalize attribute relates automatic capitalization of text made via input mechanisms other than a physical keyboard on an editable HTML element

The value is one of the following keywords:

off or none

Either off keyword or none keyword hints at no automatic capitalization

on or sentences

Either on keyword or sentences keyword hints at automatic capitalization of the first character of each sentence

word

The word keyword hints at automatic capitalization of the first character of each word

characters

The characters keyword hints at the automatic capitalization of every character

The default missing value is the user agent's default. And, the default invalid value is the sentences keyword

<editable-html-element autocapitalize="[none|characters|words|sentences]">

wrap attribute

The wrap attribute relates whether new lines are included in text submission on a textarea element

The value is one of the following keywords:

soft

The soft excludes newlines in the content submission.

hard
The hard keyword includes newlines in the content submission

The default for both missing value and invalid value is the soft keyword

<textarea wrap="[soft|wrap]"></textarea>

disabled attribute

The disabled boolean attribute relates an unusable functionality on the following elements: fieldset, select, optgroup, option, textarea, input, button, and link

Note: On a fieldset element, the unusable functionality is passed down to descendant Content Forms but not those inside a legend element

<applicable-html-element disabled>

readonly attribute

The readonly boolean attribute relates an uneditable functionality on on the following elements: textarea, and input.

<applicable-html-element readonly>

required attribute

The required boolean attribute relates a compulsory functionality on the following elements: textarea, select, and input.

<applicable-html-element required>

multiple attribute

The multiple boolean attribute relates the following functionalities:

<applicable-html-element multiple>

checked attribute

The checked boolean attribute relates an on-state on an input element

<input checked>

selected attribute

The selected boolean attribute relates a default on an option element

<option selected></option>

maxlength attribute

The maxlength attribute relates the following:

The value must be a non-negative integer. This integer is the maximum number of allowed characters

<applicable-html-element maxlength="[non-negative-integer]">

minlength attribute

The minlength attribute relates the following:

The value must be a non-negative integer. This integer is the minimum number of allowed characters

<applicable-html-element maxlength="[non-negative-integer]">

size attribute

The size attribute relates the following:

The value must be a valid non-negative integer greater than zero.

The default value is one of the following integers:

  • 4, on a select element with a multiple attribute

  • 1, on a select element without a multiple attribute

  • 20, on an input element

<applicable-html-element size="[non-negative integer]">

pattern attribute

The pattern attribute relates an acceptable form of value on an input element

The value must be a regular expression (regex). The title attribute should describe this regex.

<input pattern="[regex]">

placeholder attribute

The placeholder attribute relates an example of a value on the following elements when empty: textarea element and input element

The value must be a non-empty text

<applicable-html-element placeholder="[value-format]">

value attribute

The value attribute relates the following:

  • Starting number on an li element

    The value must be a valid integer

    <li value="[valid-integer]"></li>
    
  • Default content on an input element

    The value must conform to the value of the type attribute

    <input value="[default-content]">
    
  • Submission content on the following elements: button, and option.

    The value must be a text

    <applicable-html-element value="[text]">
    
  • Progress number so far on a progress element.

    The value must be a valid floating-point number from zero to the value of the max attribute. Or, from zero to 1.0;

    <progress value="[floating-point-number]"></progress>
    
  • Gauge number on a meter element

    The value must be a valid floating-point number.

    <meter value="[floating-point-number]"></meter>
    
  • Machine-readable representation of content on a data element

    The value must be a representation of the element's content

    <data value="[machine-representation]">[content]</data>
    

min attribute

The min attribute relates the lower bound of a range on the following elements: input, and meter.

The value must be a valid floating-point number.

<applicable-html-element min="[floating-point-number]">

step attribute

The step attribute relates an increment or decrement factor on an input element

The value must be one of the following tokens:

<input step="[arithmetic-factor]">

max attribute

The max attribute relates the upper bound of a range on the following elements: input, progress, and meter.

The value must be a valid floating-point number

<applicable-html-element max="[floating-point-number]">

low attribute

The low attribute relates the lower part of a bounded range on a meter element

The value must be a valid floating-point number. This number down to the value of the min attribute relates the lower part.

<meter low="[floating-point-number]">[range content]</meter>

high attribute

The high attribute relates the higher part of a bounded range on a meter element

The value must be a valid floating-point number. This number up to the value of the max attribute relates the lower part.

<meter high="[floating-point-number]">[range content]</meter>

optimum attribute

The optimum attribute relates the preferable part of a bounded range on a meter element

The value must be a valid floating-point number. This number within a lower part, high part, or in-between relates that part as the better part.

<meter optimum="[floating-point-number]">[range content]</meter>

accept attribute

The accept attribute relates a sort of resource for upload on an input element

The value must be a set of comma-separated tokens. Each token must be one of the following keywords:

audio/*
The audio/* string hints at uploading a sound file only
video/*
The video/* string hints at uploading a video file only
image/*
The image/* string hints at uploading an image file only
A valid MIME type string with no parameters
This hints at uploading files of the specified MIME type only
A file extension
A string starting with a full-stop character hints at uploading the specified file extension only
<input accept="[comma-separated-tokens]">

start attribute

The start attribute relates the starting number of a list on an ol element

The value must be a valid integer

<ol start="[integer]"></ol>

reversed attribute

The reversed boolean attribute relates a descending order of list items on an ol element

<ol reversed></ol>

abbr attribute

The abbr attribute relates an alternative title on a th element

The value must be a non-empty text

<th abbr="[non-empty-text]">[table header cell content]</th>

scope attribute

The scope attribute relates a set of table cells on a th element

The value is one of the following keywords:

row

The row keyword signifies that the header cell applies to some of the subsequent cells in the same row(s)

col

The col keyword signifies that the header cell applies to some of the subsequent cells in the same column(s)

rowgroup

The rowgroup keyword signifies that the header cell applies to all the remaining cells in the row group

colgroup

The colgroup keyword signifies that the header cell applies to all the remaining cells in the column group

auto

The auto keyword signifies that the header cell applies to a set of cells selected based on context

The default for both missing value and invalid value is the auto keyword

<th scope="[auto|row|col|rowgroup|colgroup]">[table header cell content]</th>

headers attribute

The headers attribute relates some th elements on the following elements: td, and th.

The value must be an unordered set of space-separated IDs of th elements. However, a th element must not relates itself.

<applicable-html-element headers="[ID ID etc.]">

cols attribute

The cols attribute relates a wideness on a textarea element

The value must be a valid non-negative integer greater than zero. This integer is the number of characters allowed per line when the scrollbar is visible in the element's viewport.

The default value is 20.

<textarea cols="[non-negative-integer]"></textarea>

span attribute

The span attribute relates a wideness on the following elements: colgroup, and col.

The value must be a valid non-negative integer both greater than zero and less than or equal to 1000. This integer is the number of columns to cover in a table element

<applicable-html-element colspan="[1 <= integer <= 1000]">

colspan attribute

The colspan attribute relates a wideness on the following elements: th, and td.

The value must be a valid non-negative integer both greater than zero and less than or equal to 1000. This integer is the number of columns to span in a table element

<applicable-html-element colspan="[1 <= integer <= 1000]">

rows attribute

The rows attribute relates a highness on a textarea element

The value must be a valid non-negative integer greater than zero. This integer is the number of lines to show.

The default value is 2.

<textarea rows="[non-negative-integer]"></textarea>

rowspan attribute

The rowspan attribute relates a highness on the following elements: th, and td.

The value must be a valid non-negative integer less than or equal to 65534. This integer is the number of rows to span in a table element. A value of Zero spans the remaining rows.

<applicable-html-element rowspan="[0 <= integer <= 65534]">

open attribute

The open boolean attribute relates a revelation of content on the following elements: details, and dialog.

<applicable-html-element open>

href attribute

The href attribute relates a resource address on the following elements: a,
area, base, and link.

The value must be a valid URL address.

<applicable-html-element href="[valid-URL-address]">

download attribute

The download boolean attribute relates a download functionality on the following elements: a, and area

<applicable-html-element download>

ping attribute

The ping attribute relates a set of addresses for hyperlink auditors on the following elements: a, and area

The value must be a set of space-separated secured URL addresses.

<applicable-html-element ping="[https-url https-url etc.]">

cite attribute

The cite attribute relates the following:

  • An address of a Changelog resource on the following elements: del, and ins.

  • An address of a Quote Source on the following elements: blockquote, and q.

The value must be a valid URL address

<applicable-html-element cite="[valid-url-address]">

datetime attribute

The datetime attribute relates the following:

  • Machine-readable representation on a time element

  • Time of document changes on the following elements: ins, and del.

The value must be a valid datetime representation.

Note: The time part of the value is optional for the following elements: ins or on a del element

<applicable-html-element datetime="[valid-datetime]">

inert attribute

The inert boolean attribute relates a non-active functionality on an HTML element

<html-element inert>

hidden attribute

The hidden attribute relates a no-render state on an HTML element. On a main element, it means a potential Main Card.

The value is one of the following keywords:

until-found

The until-found keyword maintains a no-rendering state until a user searches or jumps to a part of the content.

hidden or The empty string

The hidden keyword or an empty string keyword maintains a no-rendering state until the attribute is removed

The default missing value is a visible state. And, the default for an invalid state is the hidden keyword

<html-element hidden="[hidden|until-found]">

itemscope attribute

The itemscope boolean attribute relates a microdata item tag on an HTML element

<html-element itemscope>

itemtype attribute

The itemtype attribute relates a microdata vocabulary on an HTML element with an itemscope attribute

The value must be an unordered set of unique space-separated absolute URL.

<html-element itemscrope itemtype="[valid-absoluteURL valid-absoluteURL etc]">

itemid attribute

The itemid attribute relates the global identifier of an itemtype attribute on an itemscoped attribute

The value must be a valid URL

<html-element itemscope itemtype="[valid-absoluteURL]" itemid="[valid-URL]" >

itemprop attribute

The itemprop attribute relates a microdata property name on an HTML element

The value must be an ordered set of one or more unique space-separated tokens. Each token must be a one-length code point and of the following type:

  • Either of the following if the item is a typed item

    • A public-defined name for a property

    • Either a proprietary-defined or public-defined absolute URL for a property

  • A proprietary-defined string for a property name if the item is not a typed item.
    The string must neither contain a full-stop character nor a colon character

<html-element itemprop="[name]">[value]</html-element>

Notes on specifying the itemprop attribute:

itemref attribute

The itemref attribute relates a set of additional microdata properties on an itemscoped element

The value must be an unordered set of unique space-separated element IDs of Microdata Properties

<html-element itemscope itemref="[ID ID etc]">

popover attribute

The popover attribute relates a popover functionality on an HTML element

The value is one of the following keywords that specifies the closing mechanisms:

auto or empty string

The auto keyword or the empty string("") relates the following closing mechanisms:

  • allow closing of other opened popovers

  • allow closing of the popover via either an indirect request or clicking outside the popover

manual
  • disallow closing of other opened popovers

  • disallow closing of the popover via either an indirect request or clicking outside the popover

The default missing value is the no popover state. While the default for the invalid value is the manual keyword

<html-element popover="[auto|manual]">

popovertarget attribute

The popovertarget attribute relates a popover on the following elements: button, and input

The value must be the ID of an element with a popover attribute

<applicable-html-element popovertarget="[ID]">

popovertargetaction attribute

The popovertargetaction attribute relates the visibility status of a popover on the following elements: button, and input.

The value is one of the following keywords:

show

The show keyword shows the targeted popover content

hide

The hide keyword hides the targeted popover content

toggle

The toggle keyword switches between showing and hiding the targeted popover content

The default missing value and invalid value is the toggle keyword

<applicable-html-element popovertargetaction="[toggle|show|hide]">