HTML muted Attribute
The HTML muted attribute is a Boolean attribute that specifies that the audio output of an <audio> or <video> element should initially be muted.
Elements That Use the muted Attribute
The muted attribute is used with the <audio> and <video> elements.
Boolean Attribute
The muted attribute is a Boolean attribute. When it is present, the media element starts with its audio output muted.
<video muted></video>
Because muted is Boolean, writing muted="false" does not turn muting off. The attribute is still present, so the media starts muted. To have the media start with sound enabled, omit the attribute.
Using muted with <audio>
The muted attribute can be added to an <audio> element when the audio should initially play without sound.
<audio controls muted>
<source src="audio.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
If controls are available, the user can normally use the browser's media controls to turn the sound on.
Using muted with <video>
The muted attribute is commonly used when a video should initially play without audio.
<video controls muted>
<source src="video.mp4" type="video/mp4">
Your browser does not support the video element.
</video>
The video begins muted, but the user can turn the sound on when browser controls are provided.
muted and autoplay
Modern browsers commonly restrict media that attempts to autoplay with audible sound. Muted video is generally permitted to autoplay more readily, although autoplay behavior remains subject to browser policies and user settings.
<video autoplay muted playsinline>
<source src="video.mp4" type="video/mp4">
Your browser does not support the video element.
</video>
The muted attribute is therefore commonly combined with autoplay for automatically playing video. The playsinline attribute is also commonly included when inline playback is desired on mobile devices.
User Controls
The muted attribute establishes the initial muted state; it does not permanently disable the media's audio. When media controls are available, users can normally unmute the media and adjust its volume.
<video controls muted>
<source src="video.mp4" type="video/mp4">
</video>
Providing controls is useful when users may want to turn the sound on, pause playback, or adjust the volume.
Common Mistakes
Do not use muted="false" when you want media to start with sound. Because muted is a Boolean attribute, its presence enables the muted state regardless of the assigned text value.
Do not assume that muted permanently disables audio. It specifies the media element's initial muted state, and the state can later be changed by the user or with scripting.
Do not assume that adding autoplay guarantees automatic playback. Browsers apply their own autoplay policies, and user preferences can also affect playback behavior.
Browser Support
Baseline: Widely available indicates a feature has been supported by core browsers for at least 30 months. At this stage, the feature is considered stable and safe for most websites to use without needing to worry about compatibility issues or fallbacks, as it is supported by the vast majority of users' devices and browser versions.
The muted attribute is widely supported on both <audio> and <video> elements in current core browsers.
Checking Browser Support
For current browser compatibility information, visit Can I Use? . Search for the HTML element or attribute you want to check. You can also narrow your search by entering an element name and attribute name separated by a colon. Search results can include related HTML features, element attributes, input types, APIs, and other technologies, so select the result that most closely matches the feature you are checking.
Try the muted Attribute
The example uses the muted attribute on a video with browser controls. Play the video and use the volume control to turn the sound on.
Summary
The HTML muted attribute specifies that an <audio> or <video> element should initially have its audio output muted. It is a Boolean attribute and is commonly used with video that is intended to autoplay without audible sound.
