HTML audio Tag controls Attribute Tutorial

In this section, we will learn what controls attribute is in HTML <audio> element.

What is controls Attribute in HTML audio Tag?

If you add HTML <audio> tag to your webpage, by default you won’t see any control buttons like “play”, “sound changer”, “seekable” etc.!

So, in order to add these controls to the audio player, we need to insert the `controls` attribute to the opening tag of HTML <audio> as well.

HTML controls Attribute in audio Tag Syntax:

<audio controls> </audio>

audio Tag controls Attribute Values

The controls attribute does not take any argument as its value! Simply put, the attribute in the opening tag of HTML <audio> and audio player controls will appear on that audio player.

Example: using controls attribute in HTML audio tag

See the Pen using controls attribute in HTML audio tag by Omid Dehghan (@odchan1) on CodePen.

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies