Definition and Usage
<audio> tags define sounds, such as music or other audio streams.
Example
A simple HTML 5 audio:
<src= "Someaudio.wav"> Your browser does not support audio tags. </audio>
Hints and notes
Tip: You can place text content between the start and end tags so that older browsers can display information that does not support that tag.
Properties
| Properties |
value |
Description |
| AutoPlay |
AutoPlay |
If this property appears, the audio plays immediately when it is ready. |
| Controls |
Controls |
If this property appears, the control is displayed to the user, such as the play button. |
| Loop |
Loop |
If this property appears, the playback starts again each time the audio ends. |
| Preload |
Preload |
If this property appears, the audio loads when the page loads and prepares to play. If you use "autoplay", the property is ignored. |
| Src |
Url |
The URL of the audio to play. |
Global Properties
The <audio> tag supports global properties in HTML 5.
Event Properties
The <audio> tag supports event properties in HTML 5.
<audio> tags