Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / HTML

Knowledge base — HTML

Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.

Entries: 397

HTML

rel — relationship between a document and a resource

The rel attribute specifies a resource relationship or how a link is processed. It accepts whitespace-separated keywords whose meaning and permitted use depend on the element.

Basic · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

required — mandatory form field

The boolean `required` attribute requires a supported form control to be completed. It applies to `input`, `select`, and `textarea`; how the requirement is satisfied depends on the control type.

Basic · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

reversed — descending list numbering

The boolean `reversed` attribute on `ol` enables descending numbering. It changes the numbering direction without reversing the order of the `li` elements.

Basic · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

role — an element’s accessibility role

The `role` attribute identifies an element’s semantic role for assistive technologies. It does not add appearance or behavior. Use it within ARIA in HTML rules, and prefer elements that already provide the appropriate native semantics.

Basic · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

rows — visible textarea lines

The rows attribute specifies how many lines a textarea shows. It requires a positive integer; the default character height is 2 lines.

Basic · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

rowspan — spanning a cell across rows

The rowspan attribute specifies how many table rows a td or th cell occupies. A value of 0 means the remaining rows of its group.

Basic · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

sandbox — iframe security restrictions

The sandbox attribute imposes additional restrictions on iframe content. An empty value enables the full restriction set, while allow-* tokens lift selected restrictions. Combining allow-scripts with allow-same-origin requires particular care.

Intermediate · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

scope — table header scope

The scope attribute on th identifies which cells a table header applies to: cells in a row, column, or corresponding group. It describes semantic relationships rather than appearance or cell merging.

Basic · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

selected — default option selection

The boolean selected attribute specifies an option element's default selection. It is not a reliable reading of the current choice: in JavaScript, selected describes the current state, while defaultSelected reflects the attribute.

Basic · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

shadowrootclonable — cloning a declarative shadow root

The boolean shadowrootclonable attribute on a template element marks a declarative shadow root as clonable. Copying the host element can then include its shadow tree as well.

Intermediate · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

shadowrootcustomelementregistry — deferred registry assignment

A boolean attribute on template that leaves a declarative shadow root without a custom element registry. It allows a registry to be assigned later through initialize(), rather than automatically using the document's registry.

Advanced · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

shadowrootdelegatesfocus — focus delegation in declarative Shadow DOM

The boolean shadowrootdelegatesfocus attribute on template enables focus delegation for a declaratively created shadow root. It allows focus to move from the host to a suitable internal element; it neither creates a shadow root by itself nor automatically focuses anything.

Intermediate · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

shadowrootmode — declarative shadow DOM

The shadowrootmode attribute on template lets the HTML parser create a declarative shadow root. Its open and closed values determine the access mode of that root.

Intermediate · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

shadowrootserializable — serializing a declarative shadow root

The boolean shadowrootserializable attribute marks a declarative shadow root for serialization through getHTML({ serializableShadowRoots: true }). It does not automatically include that root in ordinary getHTML() output or the host's innerHTML.

Intermediate · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

shadowrootslotassignment — assigning nodes to slots

The shadowrootslotassignment attribute on template selects how nodes are assigned to slots in a declarative shadow root: automatic named assignment or explicit manual assignment.

Intermediate · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

shape — image-map area geometry

The shape attribute on area selects the geometry of an image-map region. The rect, circle, and poly values require coords; default covers the entire image.

Basic · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

size — input field or select list size

The size attribute specifies the visible width of a text input in characters or the number of visible select options. It neither limits the value length nor enables multiple selection.

Basic · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

sizes — image source-selection width and icon dimensions

The sizes attribute has two distinct meanings: on img and source it describes the image width used to select a resource from srcset; on link it declares available icon dimensions. It does not replace CSS rules that determine the displayed image size.

Intermediate · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

slot — assigning an element to a Shadow DOM slot

The global slot attribute selects a named slot in Shadow DOM where an element is presented. Its value corresponds to the slot element's name value; the attribute and the element have different roles.

Intermediate · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

span — column count for col and colgroup

The span attribute specifies how many columns a col or colgroup represents. It accepts integers from 1 through 1000 and does not merge table cells.

Basic · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

HTML term or value: spellcheck

The `spellcheck` attribute gives the browser a hint about whether editable text should receive spelling and grammar checking.

Basic · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

src — resource address

The `src` attribute specifies the URL of a resource used by an HTML element, such as an image, script, or recording. It is not a global attribute: its applicability, requirement, and loading behavior depend on the element.

Basic · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

srcdoc — an inline HTML document for iframe

The srcdoc attribute supplies an iframe document's HTML without a separate file and takes precedence over src.

Basic · WHATWG HTML Living Standard; index snapshot date recorded separately
HTML

srclang — text track language

The srclang attribute on track identifies the language of text track data using a BCP 47 language tag. It is required for subtitles, including when kind is omitted.

Basic · WHATWG HTML Living Standard; index snapshot date recorded separately