The audio Element part 3

HTML Fundamentals
HTML5
The audio Element
31
3/3
               

Attributes of <audio>



controls
Specifies that audio controls should be displayed (such as a play/pause button, etc.)

autoplay
When this attribute is defined, audio starts playing as soon as it is ready, without asking for the visitor's permission.
<audio controls autoplay>Try It Yourself

loop
This attribute is used to have the audio replay every time it is finished.
<audio controls autoplay loop>Try It Yourself

Currently, there are three supported file formats for the <audio> element: MP3, WAV, and OGG.

Comments