Language References
Specifies whether the audio ouput of a media resource is silenced.
Inline |
<element muted... > |
Script |
object.muted = true | false ] |
The property is read/write with a default value of false.
The muted attribute is a boolean attribute, meaning its presence on an element represents true, and its absence represents false.
When present, the user agent silences the audio output of a media resource by default, which users can eventually override.
This is particularly useful when also using the autoplay attribute, as some browsers, specifically Mozilla Firefox ( as of this writing ) permit autoplay only when the audio output is muted.
Example of using the muted attribute with the <audio
> element.
<audio controls autoplay muted>
<source src="happy-day.mp3" type="audio/mpeg">
Sorry, your browser does not support the audio element.
</audio>
which would render on a Web page as follows:
Example of using the muted attribute with the <video
> element.
<video controls width=640 height=360 autoplay muted>
<source src="praise.mp4" type="video/mp4">
Sorry, your browser does not support the video element.
</video>
which would render on a Web page as follows:
AUDIO VIDEO