muted

The muted attribute in HTML is a Boolean attribute used with media elements such as <video> or <audio>. When applied, it ensures that the audio is turned off by default.

muted attribute

The muted attribute in HTML is a Boolean attribute applied to media elements like <audio> and <video>. When included, it ensures that the media plays without sound initially. It does not need a specific value; simply adding the attribute mutes the audio by default.

Syntax

index.html
<tagname muted>

Example

index.html
<video width="400" height="300" muted controls>
  <source src="video.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video>

Values

The muted attribute is a Boolean attribute, meaning it doesn't have any associated values.

Applies To

The muted attribute can be applied to the following HTML elements:

Conclusion

The muted attribute in HTML is a straightforward and useful way to begin media elements, such as <audio> and <video>, with no sound. As a Boolean attribute, it doesn't need a value—simply including it ensures that the audio is muted by default. This is particularly helpful for autoplay videos or other media where sound should be off initially.