onvolumechange — handle volume or mute changes
The onvolumechange attribute contains JavaScript that handles a media element's volumechange event. It responds to changes in volume or muted, not just to movement of a volume slider.
CKTIS / Knowledge base
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
The onvolumechange attribute contains JavaScript that handles a media element's volumechange event. It responds to changes in volume or muted, not just to movement of a volume slider.
The onwaiting attribute specifies code to run for the waiting event. On audio and video elements, this event signals that playback cannot continue because sufficient data is unavailable. The attribute itself does not start downloading or playback.
The global HTML attribute onwheel specifies code handling the wheel event. It is not a boolean attribute: its value contains JavaScript statements.
The boolean open attribute controls whether details is expanded or dialog is open. Its presence matters, not its text value; open alone does not create a modal dialog.
The optimum attribute on meter identifies a preferred value and, together with low and high, determines the optimal region.
The `pattern` attribute defines a regular expression that must match the entire nonempty input value. For an `email` input with `multiple`, each address must match separately. Use `required` to make the field mandatory.
The ping attribute on a and area elements lists URLs to notify when a hyperlink is followed. It does not change the href destination, and the browser may suppress notifications.
The placeholder attribute supplies a short hint for an empty input or textarea. It does not set the control's value and must not replace its label.
The boolean playsinline attribute hints that a browser should play video within the element's playback area rather than fullscreen or in a separate window. It is a hint, not a guarantee; omitting it does not force fullscreen.
The global `popover` attribute creates an initially hidden panel displayed above page content. Its `auto`, `manual`, and `hint` values determine how the panel closes.
The popovertarget attribute connects a button to a popover element through its id. It enables showing and hiding that element without JavaScript.
The popovertargetaction attribute determines whether a button shows, hides, or toggles the popover identified by popovertarget. A missing attribute or invalid value means toggle.
The poster attribute on video specifies a preview image that the browser can display before video playback.
The preload attribute on audio and video tells the browser how much media data may be worth fetching ahead of time. Its none, metadata, and auto values are hints, not guarantees.
The readonly boolean attribute prevents user editing in supported input controls and textarea, but does not prevent JavaScript changes or itself exclude values from form submission. For form-associated custom elements, its built-in behavior is narrower.
The referrerpolicy attribute specifies how much information about the referring page’s address a browser may send in the Referer header during navigation or resource fetching. It applies to a particular element; it is neither a global attribute nor a CORS setting.
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.
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.
The boolean `reversed` attribute on `ol` enables descending numbering. It changes the numbering direction without reversing the order of the `li` elements.
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.
The rows attribute specifies how many lines a textarea shows. It requires a positive integer; the default character height is 2 lines.
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.
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.
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.