HTML <audio> controls attribute

Definition and usage

controls The attribute is a boolean attribute.

If this attribute is set, it specifies that audio controls should be displayed.

Audio controls should include:

  • Play
  • Pause
  • Search
  • Volume
  • Full-screen switch
  • Subtitles (if available)
  • Audio track (if available)

Example

The <audio> element with browser default controls:

<audio controls>
  <source src="horse.mp3" type="audio/mpeg">
  <source src="horse.ogg" type="audio/ogg">
  Your browser does not support the audio tag.
</audio>

Try it yourself

Syntax

<audio controls>

Browser support

The numbers in the table indicate the first browser version to fully support this attribute.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
4.0 9.0 3.5 4.0 11.5