The controls attribute on an <audio> tag specifies that the audio player will display its audio controls.
These controls allow users to interact with features like play, pause, track, volume, etc.
An <audio> element with a controls attribute.
Without this attribute the audio player would not be visible.
<audio controls>
<source src="/media/epic.mp3" type="audio/mpeg">
</audio>
The controls attribute specifies that audio controls are displayed.
In fact, without the controls attribute the audio player is not visible.
The audio controls contain the following button functions:
<audio controls>
Here is when controls support started for each browser:
Chrome
|
4.0 | Jan 2010 |
Firefox
|
3.5 | Jun 2009 |
IE/Edge
|
9.0 | Mar 2011 |
Opera
|
11.5 | Aug 2011 |
Safari
|
4.0 | Jun 2009 |