Thanks to visit codestin.com
Credit goes to www.cssportal.com

CSS Portal

CSS text-emphasis Property

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The text-emphasis CSS property provides a typographic mechanism for marking or highlighting individual characters with small marks — commonly used in East Asian typography to indicate emphasis or pronunciation cues. Unlike simple color or weight changes, these marks are rendered as distinct glyph-like annotations that sit adjacent to or above the base text, giving readers a visual cue tied to specific characters rather than the whole run. Because they are conceptual annotations rather than content, they are intended to aid readability and meaning without altering the underlying text content.

Rendering and placement of emphasis marks are sensitive to the writing direction and orientation of the text. For example, vertical text flows will position emphasis marks differently than horizontal flows, and implementations will consult settings such as writing-mode when calculating where to draw the marks relative to glyphs. Emphasis marks are applied at the inline level, so they follow the same inline layout model as the characters they annotate and are repeated per character (or per cluster as the user agent decides), rather than being a single decoration applied to an entire element.

When designing with emphasis marks, consider how they interact visually and functionally with other typographic styling. They are distinct from underlines, overlines, and other line-based ornaments created by text-decoration, so combining both can produce visual clutter or layering effects that need careful spacing and contrast. Likewise, overall type metrics and legibility are influenced by the element’s font settings (size, line-height, and variant choices), since the relative size and placement of emphasis marks are perceived in relation to the base glyphs. Finally, because emphasis marks are presentation-only, keep accessibility and content semantics in mind: they should not be relied on as the sole method to convey essential information that assistive technologies might not convey.

Definition

Initial value
See individual properties
Applies to
All elements
Inherited
Yes
Computed value
See individual properties
Animatable
See individual properties
JavaScript syntax
object.style.textEmphasis

Interactive Demo

The rusty swing set creaked.

Syntax

text-emphasis: <text-emphasis-style> || <text-emphasis-color>

Values

Example

<div class="container">
<h1>text-emphasis examples</h1>

<p class="em-dot">This paragraph uses a filled dot emphasis mark.</p>

<p class="em-open-circle">Open circle emphasis positioned before the text.</p>

<p class="em-triangle-under">Filled triangle positioned under the text.</p>

<p class="em-sesame">Sesame emphasis with a custom color.</p>

<p class="no-emphasis">No emphasis on this paragraph (control).</p>
</div>
/* Basic layout */
.container {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  max-width: 56rem;
  margin: 2rem auto;
  line-height: 1.6;
  padding: 1rem;
  color: #222;
}

h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Examples using text-emphasis */
/* Filled dot, default position (after) */
.em-dot {
  -webkit-text-emphasis: filled dot;
  text-emphasis: filled dot;
  margin-bottom: 0.75rem;
}

/* Open circle positioned before the text */
.em-open-circle {
  -webkit-text-emphasis: open circle;
  text-emphasis: open circle;
  -webkit-text-emphasis-position: before;
  text-emphasis-position: before;
  margin-bottom: 0.75rem;
}

/* Filled triangle positioned under the text (after + under) */
.em-triangle-under {
  -webkit-text-emphasis: filled triangle;
  text-emphasis: filled triangle;
  -webkit-text-emphasis-position: after under;
  text-emphasis-position: after under;
  margin-bottom: 0.75rem;
}

/* Open sesame with custom color */
.em-sesame {
  -webkit-text-emphasis: open sesame;
  text-emphasis: open sesame;
  -webkit-text-emphasis-color: #b03a2e;
  text-emphasis-color: #b03a2e;
  margin-bottom: 0.75rem;
}

/* Control paragraph */
.no-emphasis {
  margin-bottom: 0.75rem;
  opacity: 0.85;
}

Browser Support

The following information will show you the current browser support for the CSS text-emphasis property. Hover over a browser icon to see the version that first introduced support for this CSS property.

This property is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 1st January 2026

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!