HTML Attributes

HTML default attribute

Marks a text track as the default selection, subject to user preferences. Use at most one default track per media element. Applicable elements include: <track>. Check each element’s value rules. Boolean syntax: presence enables the state; omit the attribute to disable it. A string value of "false" does not turn it off. Example uses illustrative URLs or local assets; provide the corresponding files or application endpoints when running it.

Formal Syntax & Structure

html syntaxhtml
default

Parameters & Attributes

NameTypeDescription
defaultbooleanMarks a text track as the default selection, subject to user preferences. Use at most one default track per media element.

Working Example

Example Snippethtml
<video controls src="lesson.mp4">  <track kind="captions" src="captions.vtt" srclang="en" label="English" default></video>
HTML Reference