CSS text-emphasis-color Property

Description

The text-emphasis-color CSS property is used to specify the color of emphasis marks applied to text using the ::before and ::after pseudo-elements. Emphasis marks are typically used in some East Asian typography to highlight specific characters or phrases within text. This property allows designers to customize the color of these emphasis marks, providing greater control over the visual presentation of text in languages and contexts where emphasis marks are employed. It is a part of CSS3 text emphasis module, designed to enhance typographic flexibility and aesthetics in web design.

Initial value
currentColor
Applies to
All elements
Inherited
Yes
Computed value
As specified
Animatable
Yes
JavaScript syntax
object.style.textEmphasisColor

Interactive Demo

The rusty swing set creaked.

Syntax

text-emphasis-color: <color>

Values

  • <color>Specify the foreground color of the emphasis marks.

Example

<p>Here's an example:</p>
<br>
<em>This has emphasis marks!</em>
em {
  text-emphasis-color: #3366FF;
  text-emphasis-style: "*";
}

Browser Support

The following table will show you the current browser support for the CSS text-emphasis-color property.

Desktop
Edge Chrome Firefox Opera Safari
999946857
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
99466871899

Last updated by CSSPortal on: 2nd January 2024