HTMLThe 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 separatelyHTMLThe 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 separatelyHTMLThe 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 separatelyHTMLThe 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 separatelyHTMLThe 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 separatelyHTMLThe 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 separatelyHTMLThe `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 separatelyHTMLThe 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 separatelyHTMLThe 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 separatelyHTMLThe 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 separatelyHTMLThe 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 separatelyHTMLThe 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 separatelyHTMLonbeforeinput 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 separatelyHTMLThe 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 separatelyHTMLThe 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 separatelyHTMLThe `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 separatelyHTMLThe onbeforeunload attribute on body sets a handler for the Window object's beforeunload event. It can request a warning before leaving the page, but it guarantees neither a dialog nor cancellation of navigation.
Intermediate · WHATWG HTML Living Standard; index snapshot date recorded separatelyHTMLThe onblur attribute contains JavaScript that runs for the blur event when an element loses focus. It lets you respond to leaving a field regardless of whether the user changed its value.
Basic · WHATWG HTML Living Standard; index snapshot date recorded separatelyHTMLThe oncancel attribute contains code that runs when a cancel event is received. On a dialog element, it lets you respond to a close request and, when the event is cancelable, prevent closing.
Basic · WHATWG HTML Living Standard; index snapshot date recorded separatelyHTMLThe oncanplay attribute contains JavaScript that runs for the canplay event. For audio and video, this signals readiness to start or resume playback, but does not guarantee that the entire resource can play without buffering interruptions.
Basic · WHATWG HTML Living Standard; index snapshot date recorded separatelyHTMLThe oncanplaythrough attribute contains JavaScript that handles the canplaythrough event. For audio and video, this signals an estimated ability to play through to the end without further buffering, not a guarantee of uninterrupted playback.
Basic · WHATWG HTML Living Standard; index snapshot date recorded separatelyHTMLThe onchange attribute contains JavaScript that runs for a change event. For form controls, this represents a committed user change, not necessarily every edit to the value.
Basic · WHATWG HTML Living Standard; index snapshot date recorded separatelyHTMLThe onclick attribute contains JavaScript that handles a click event. Distinguish it from the element.onclick property.
Basic · WHATWG HTML Living Standard; index snapshot date recorded separatelyHTMLThe onclose attribute contains JavaScript that handles the close event. A typical use is responding when a dialog element closes, for example by reading its returnValue. It is not a mechanism for preventing closure.
Basic · WHATWG HTML Living Standard; index snapshot date recorded separately