:muted CSS Pseudo Class

If this site has been useful, we’d love your support! Running this site takes time and resources, and every small contribution helps us keep creating valuable content. Consider buying us a coffee to keep things going strong!

Description

The CSS :muted pseudo-class selector represents an element that is capable of making sound, such as an <audio> or <video> element, but is muted (forced silent). Muted is different from :volume-locked in that the page author has control over whether a media element can be muted or un-muted.

The :muted pseudo-class can be used to style muted media elements differently than unmuted media elements. For example, you could use it to make muted media elements less visually prominent, or to display a message indicating that the media is muted.

Here is an example of how to use the :muted pseudo-class to style muted video elements:

video:muted {
opacity: 0.5;
filter: grayscale();
}

This will make muted video elements 50% transparent and grayscale.

The :muted pseudo-class is a relatively new CSS feature, and it is not supported by all browsers yet. However, it is becoming increasingly popular, and it is a good idea to start using it now to ensure that your website looks good in all browsers.<

Syntax

:muted {
  /* ... */
}

Example

No example, see css tab for code example.
:muted {
outline: 5px solid red;
}

video:muted {
outline: 5px solid blue;
}

Browser Support

The following table will show you the current browser support for the CSS :muted pseudo class.

Desktop
Edge Chrome Firefox Opera Safari
xxxx15.4
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
xxx15.4xx

Last updated by CSSPortal on: 1st October 2023