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

label attribute — a user-visible name

The label attribute names an optgroup group, an option, or a track. It is not a global attribute or a replacement for the label element. An option’s label and its submitted form value are separate concepts.

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

HTML term or value: lang

The `lang` attribute declares the natural language of an element and its contents so browsers and assistive technologies can select appropriate pronunciation and typographic rules.

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

list — connecting an input to suggestions

The `list` attribute connects an `input` to a `datalist` containing suggested values. It does not restrict the entered value to those suggestions.

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

loading — deferring resource loading

The loading attribute controls whether resource loading can be deferred based on an element's position relative to the viewport. It accepts lazy or eager; omission and invalid values mean eager. The standard defines it for img, iframe, audio, and video.

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

loop — repeating media playback

The boolean loop attribute on audio and video enables repetition: media returns to the beginning when it reaches the end. It does not start playback by itself.

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

low — upper boundary of a meter’s low range

The low attribute on meter defines the upper boundary of the low measurement range. It sets neither the minimum nor the current value; optimum determines what low values mean.

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

max — upper value bound

The max attribute sets the upper bound for selected input types, a meter scale, or task progress. Its value format, defaults, and the consequences of exceeding the bound depend on the element.

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

maxlength — maximum text length

The maxlength attribute limits text length in textarea and selected input types. It counts UTF-16 code units rather than user-perceived characters. It does not limit a numeric value or automatically truncate text assigned by a script.

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

The media attribute — conditional resource applicability

The media attribute contains a media query list that determines when styles apply, a source is considered, or theme-color metadata is used. Its exact behavior depends on the element: link, style, source, or meta.

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

method — form submission method

The method attribute on form selects get, post, or dialog. It determines how form data is submitted, or closes a dialog instead of making a network request.

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

min — lower value bound

The min attribute sets the lower bound for supported input types and for a meter's range. It does not specify a minimum text length.

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

minlength — minimum text length

The minlength attribute sets the minimum length of a nonempty user-entered value in a textarea or supported input field. It does not make the field mandatory; use required for that.

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

multiple — multiple values in a form control

The boolean `multiple` attribute permits multiple options in `select`, multiple addresses in an `email` input, or multiple files in a `file` input. Its presence controls the behavior, not the text of its value.

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

muted — default media muting

The muted boolean attribute specifies default muting for audio and video elements. The defaultMuted property reflects the attribute, whereas muted reads and changes current muting.

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

HTML name attribute — element-specific meaning

The `name` attribute supplies an element-specific name: a form-data key, navigation target name, image-map name, `details` group, slot name, or metadata name. It is not a global attribute or a replacement for `id`.

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

nomodule — a classic script for browsers without modules

The boolean `nomodule` attribute on `script` prevents a classic script from executing in browsers that support both JavaScript modules and the attribute. It lets you supply a legacy version of your code alongside a module script.

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

The nonce attribute

The nonce attribute holds a textual cryptographic value used by Content Security Policy (CSP). The element.nonce property exposes it to scripts even when the browser hides the attribute value.

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

novalidate — skipping validation during form submission

The boolean `novalidate` attribute on a `form` skips built-in constraint validation during submission. It does not remove field constraints or disable explicit calls to validation methods.

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

onafterprint — handling the post-print event

The onafterprint attribute on body sets a handler for the Window object's afterprint event. It can restore the interface after the printing procedure, but it does not confirm that the document was printed.

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

onauxclick — auxiliary-button click handler

The onauxclick attribute assigns JavaScript code to the auxclick event, associated with clicking a non-primary pointing-device button. It can be used on all HTML elements.

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

onbeforeinput — handling an event before editing

onbeforeinput is an event-handler attribute for beforeinput, which concerns user editing of data. It lets JavaScript run before a change and cancel the default operation when the event is cancelable.

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

onbeforematch — handle an event before hidden content is revealed

The global onbeforematch attribute contains JavaScript handling the beforematch event. It lets code react before the browser reveals an element with hidden="until-found" during find-in-page or fragment navigation.

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

onbeforeprint — handling the event before printing

The onbeforeprint attribute on body defines JavaScript code that handles the Window object's beforeprint event. It lets you prepare document content before printing; it does not start printing by itself.

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

onbeforetoggle — handle an upcoming state change

The `onbeforetoggle` attribute sets a handler for `beforetoggle`. The event fires before a popover opens but not before every close. It also fires before dialog transitions initiated by methods such as `showModal()` or `close()`. Directly adding or removing a dialog’s `open` attribute does not fire the event. The handler can inspect the previous and intended states and cancel opening.

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