Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / Knowledge base

Knowledge base

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

Entries: 5788

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
HTML

srcset — image candidate list

The `srcset` attribute supplies alternative image resources to the browser. The `x` descriptors describe pixel density, while `w` descriptors describe resource widths used together with `sizes` for image selection.

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

start — initial list numbering value

The start attribute on ol sets the initial numbering value of an ordered list. Its value must be an integer.

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

step — allowed-value increments for input

The step attribute sets the spacing between allowed numeric or date/time values in an input. Steps are measured from a base; any removes this constraint without removing other validity rules.

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

HTML term or value: style

The `style` attribute contains a CSS declaration list applied directly to one element and exposed to scripts through `CSSStyleDeclaration`.

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

switch — a switch control for input

In browsers that support it, the boolean switch attribute turns an input of type checkbox into a two-state switch. Its on/off state is still determined by checked.

Basic · Nonstandard browser extension; not defined by the WHATWG HTML Living Standard.
HTML

HTML term or value: tabindex

The `tabindex` attribute controls focusability and participation in sequential keyboard navigation.

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

target — navigation destination

The `target` attribute selects where a destination document opens: in the current context, a new tab or window, or a named frame. It applies to hyperlinks and forms; the `base` element can establish a document-wide default target.

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

HTML term or value: title

The `title` attribute supplies advisory text associated with an element; a browser may show it as a tooltip, but exposure and interaction depend on the device.

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