HTML5 Tutorials & More

<audio> Tag

The <audio> tag defines sound, such as music or other audio streams.

Supported In HTML4: No

Supported In HTML5: Yes

HTML4 vs HTML5 Differences: The <audio> tag is new in HTML 5.

Attributes

Title Values Description HTML4 Support HTML5 Support
autoplay autoplay If present, the audio will start playing as soon as it is ready. No Yes
controls controls If present, controls will be displayed, such as a play button. No No
loop loop If present, the audio will start over again, every time it is finished. No No
preload auto metadata none Specifies if the audio should be loaded when the page loads, or not. Ignored if autoplay is present. No No
src url Defines the URL of the audio to play No No

Standard Attributes

All standard attributes are supported.

Event Attributes

All event attributes are supported.

HTML5 Tags