HTML muted Attribute

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 3 Examples
Media & Video

Introduction

The muted attribute is a boolean HTML attribute on <video> and <audio> that silences media when it loads. Video still plays visually; audio output is off until the user unmutes via controls or JavaScript sets element.muted = false. It is common for background hero videos, preview clips, and autoplay content because browsers often block autoplay with sound. Add it by writing muted alone—there is no separate unmuted value.

What You’ll Learn

01

Boolean attr

Present = silent.

02

video & audio

Media elements.

03

Default state

No sound on load.

04

+ autoplay

Browser policy.

05

+ controls

User can unmute.

06

.muted JS

true / false.

Purpose of muted Attribute

The primary purpose of muted is to control initial audio output. A looping background video on a landing page should not blast sound unexpectedly. An embedded preview can play silently until the visitor chooses to listen. Setting muted in HTML establishes that default before playback starts.

Modern browsers restrict autoplay with audio to protect users. Combining autoplay with muted (and often playsinline on mobile) is the standard pattern for auto-starting video. Always provide a visible way to enable sound when audio is important to the content.

💡
No unmuted attribute

The old reference listed unmuted as a value—that is incorrect. To play with sound, omit the muted attribute or set element.muted = false in JavaScript.

📝 Syntax

Add the boolean muted attribute to video or audio:

muted.html
<video controls muted playsinline>

  <source src="movie.webm" type="video/webm">

  Your browser does not support the video tag.

</video>



<audio controls muted src="ambient.mp3"></audio>



<video autoplay muted loop playsinline src="hero.mp4"></video>

Syntax Rules

  • Boolean attribute—write muted alone; presence means silenced.
  • Valid on <video> and <audio> only.
  • JavaScript IDL property: mediaElement.muted = true (boolean).
  • Pair with controls so users can unmute when sound matters.
  • Often combined with autoplay and playsinline for background video.
  • Does not replace captions—mute audio track, not accessibility requirements.

💎 Values

The muted attribute is boolean—it has no meaningful string value:

  • muted — Attribute present; media starts with audio silenced.
  • muted="" — Also valid in HTML5; same as bare muted.
  • Attribute absent — Normal audio output (subject to volume and user settings).
  • JavaScript: el.muted = true mutes; el.muted = false restores audio.
muted-js.html
const video = document.getElementById("myVideo");

video.muted = true;   // mute

video.muted = false;  // unmute

⚡ Quick Reference

Use caseMarkupNotes
Silent video<video controls muted>User can unmute
Silent audio<audio controls muted>Starts muted
Autoplay heroautoplay muted playsinline loopBrowser-friendly
Unmute via JSvideo.muted = falseBoolean property
Not mutedOmit mutedDefault with sound
Volume levelvideo.volume = 0.5Separate JS property

Applicable Elements

ElementSupported?Notes
<video>YesMost common use
<audio>YesSilent audio by default
<source>, <track>NoMute on parent media element
<iframe>NoUse embed API or allow attribute

muted vs volume vs removing audio

ApproachHowEffect
muted attributeHTML boolean on mediaSilences audio output entirely
volume property (JS)el.volume = 0 to 1Adjust loudness; 0 is silent but not same flag as muted
No audio track in fileEncode video without audioNothing to unmute; different from muted
autoplay without mutedHTML autoplay aloneOften blocked by browsers

Examples Gallery

Muted video with toggle, muted audio element, and setting element.muted with JavaScript.

👀 Live Preview

Simulated mute state indicator (native media requires user interaction in some contexts):

Muted state: on

Real <video muted> elements start with muted=true. Users unmute via controls or video.muted = false.

Example — Muted Video

Start a video silently with playback controls:

video-muted.html
<video controls muted playsinline>

  <source src="movie.mp4" type="video/mp4">

  Your browser does not support the video tag.

</video>
Try It Yourself

How It Works

The muted content attribute maps to the IDL muted property on HTMLMediaElement. Visual playback is unaffected; only audio output is suppressed.

Example — Muted Audio

Load an audio clip that starts muted:

audio-muted.html
<audio controls muted src="ambient.mp3"></audio>
Try It Yourself

How It Works

Same boolean behavior as on <video>. The audio element’s timeline still advances; output volume is zero while muted.

Dynamic Values with JavaScript

Mute or unmute at runtime:

dynamic-muted.html
<video id="myVideo" controls src="clip.mp4"></video>



<script>

  const video = document.getElementById("myVideo");

  video.muted = true;   // mute

  video.muted = false;  // unmute

</script>
Try It Yourself

How It Works

The property reflects and updates the muted state. Setting muted = false does not change volume—it re-enables audio at the current volume level.

♿ Accessibility

  • Do not hide important speech — If dialogue matters, provide captions even when video is muted.
  • Let users control sound — Offer clear unmute buttons; do not trap users in silent playback for essential content.
  • Avoid surprise autoplay — Muted autoplay is more acceptable than loud autoplay, but moving video can still distract; respect prefers-reduced-motion.
  • Label controls — Custom mute toggles need accessible names (e.g. “Unmute video”).
  • Transcripts for audio-only — Muted audio with no alternative text excludes users who rely on hearing.

🧠 How muted Works

1

Author adds muted

Boolean on media.

Markup
2

Media loads

muted property true.

Init
3

Playback runs

No audio output.

Play
=

Silent by default

User or JS can unmute.

Browser Support

The muted attribute on <video> and <audio> is fully supported in all modern browsers. Autoplay-with-muted policies vary slightly by browser but are widely implemented.

HTML5 · Fully supported

Universal media muting

Chrome, Firefox, Safari, and Edge honor muted on video and audio.

99% Browser support
Google Chrome Fully supported
Full support
Mozilla Firefox Fully supported
Full support
Apple Safari Fully supported
Full support
Microsoft Edge Fully supported
Full support
muted on video and audio 99% supported

Bottom line: Safe for silent defaults and muted autoplay patterns in production.

💡 Best Practices

✅ Do

  • Use muted for background and autoplay video
  • Provide controls or a clear unmute button
  • Pair autoplay with muted and playsinline
  • Add captions when speech is important
  • Test mute/unmute across mobile and desktop

❌ Don’t

  • Use a fictional unmuted attribute value
  • Hide the only way to enable sound for key content
  • Assume muted video needs no captions
  • Autoplay loud video without user gesture (blocked anyway)
  • Confuse muted with volume = 0 for all use cases

Conclusion

The muted attribute gives you simple control over whether media plays with sound. On <video> and <audio>, it sets a silent default that protects users from unexpected noise and satisfies autoplay policies.

Omit the attribute when sound should start enabled, use controls or custom UI to let users unmute, and toggle element.muted in JavaScript when your app logic requires it.

Key Takeaways

Knowledge Unlocked

Five truths every developer should know about muted

Bookmark these before embedding media.

5
Core concepts
🎬 02

video & audio

Media only.

Scope
▶️ 03

+ autoplay

Policy friendly.

Autoplay
⚙️ 04

.muted JS

true / false.

Dynamic
05

Captions still

Mute ≠ a11y done.

A11y

❓ Frequently Asked Questions

It silences <video> or <audio> by default. Playback can continue; audio output is off until unmuted.
<video> and <audio> only. Set mute on the media element, not on <source> or <track>.
No. Omit muted for sound, or set element.muted = false in JavaScript.
mediaElement.muted = true or false on HTMLMediaElement.
Browsers block autoplay with sound. Muted autoplay is usually allowed for background video.
No. Muting disables audio output; captions and transcripts are still needed for accessible content.

Silence media by default with muted

Practice muted video, muted audio, and dynamic .muted in the Try It editor.

Try muted video →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful