Skip to content
Related Articles

Related Articles

How to mute audio using HTML5 ?
  • Last Updated : 14 Jul, 2020

In this article, we mute the audio by using the muted attribute in the <audio> tag of the HTML document. It is used to define that the audio should be muted on the webpage.

Syntax:

<audio controls muted>

Example:




<!DOCTYPE html> 
<html
<head>
    <title>
        How to mute an audio using HTML5?
    </title>
</head>
  
<body
    <h2>
        GeeksForGeeks
    </h2>
    <h2>
       How to mute an audio using HTML5?
    </h2>
    <p>Audio Sample</p
  
    <audio controls muted> 
        <source src="test.mp3" type="audio/mp3"
        <source src="test.ogg" type="audio/ogg"
    </audio
  
</body
  
</html>                    

Output:

Supported browsers are listed below:

  • Google Chrome 4.0
  • Internet Explorer 9.0
  • Firefox 3.5
  • Opera 10.5
  • Safari 4.0
My Personal Notes arrow_drop_up
Recommended Articles
Page :