HTML <audio> controlsAttribute
Example
<audio> element with browser default controls:
<audio controls>
<source src="horse.ogg.html" type="audio/ogg">
<source src="horse.mp3.html" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<source src="horse.ogg.html" type="audio/ogg">
<source src="horse.mp3.html" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
Internet Explorer 9+, Firefox, Opera, Chrome, and Safari support the controls attribute.
Note:Internet Explorer 8 and earlier IE versions do not support the <audio> tag.
Definition and Usage
The controls attribute is a boolean attribute.
If the attribute is present, it specifies the display of audio controls.Audio/Video controls include:
- Play
- Pause
- Progress bar
- Volume
Differences between HTML 4.01 and HTML5
The <audio> element is new in HTML5.
Differences between HTML and XHTML
In XHTML, attribute minimization is not allowed, and the controls attribute must be defined as <audio controls="controls">.
Syntax
<audio controls>
Other Extensions
HTML <audio> Tag