HTML Attributes
HTML autoplay attribute
Requests that media begin playback without a manual play action. Browsers may block it, especially for audible media; provide controls. Applicable elements include: <audio>, <video>. 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
autoplayParameters & Attributes
| Name | Type | Description |
|---|---|---|
| autoplay | boolean | Requests that media begin playback without a manual play action. Browsers may block it, especially for audible media; provide controls. |
Working Example
Example Snippethtml
<video src="demo.mp4" autoplay muted controls playsinline></video>Browser Compatibility
Minimum supported versions across modern rendering engines
Chrome
3
Yes
Edge
12
Yes
Firefox
3.5
Yes
Safari
3.1
Yes
Opera
10.5
Yes
Checked desktop BCD snapshot: autoplay on video; subject to user and browser policies. Versions denote the recorded start of support (≤ means at least that early), not a guarantee of all behavior. Unresolved mirror and preview rows omitted.
HTML Living Standard