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
defaultParameters & Attributes
| Name | Type | Description |
|---|---|---|
| default | boolean | Marks 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>