CSS text-emphasis Property

Beginner
5 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The text-emphasis property is a shorthand that draws emphasis marks on text (except spaces and control characters). It sets text-emphasis-style and text-emphasis-color.

It is inherited. Marks are about half the font size and may increase line height. Unlike text-decoration, emphasis marks apply per character and can change on descendants.

Note Position is not reset

text-emphasis does not reset text-emphasis-position. Style and color change often; position usually stays the same.

CSS Syntax

syntax.css
text-emphasis: <style> || <color> | initial | inherit;

Style can be none, a shape keyword list (filled / open plus dot, circle, and others), or a one-character <string>.

Property Values

ValueDescriptionTry it
noneNo emphasis marks (default style)Try it
filled / openSolid or hollow mark. Default fill is filledTry it
dot / circle / triangle …Built-in shapes. Also double-circle, sesameTry it
<string>Custom one-character mark, e.g. "★"Try it
<color>Mark color. Defaults to currentColorTry it
initial / inheritReset, or take the parent emphasisTry it

How to Use text-emphasis

Pick a mark style, optionally a color, and apply it to the text you want to highlight.

  1. Choose a shape (dot, circle, triangle, sesame, …) or a one-character string.
  2. Optionally add filled or open, plus a color.
  3. Write one rule: text-emphasis: filled sesame #555.
  4. Adjust placement only if needed with text-emphasis-position.
PieceRequired?Role
StyleYes (to see marks)Shape keywords or a <string>
ColorOptionalDefaults to currentColor
PositionOptionalSeparate property; not part of this shorthand
LonghandsOptionalUse when style and color need different cascade rules

Live Preview

Switch emphasis styles on a short phrase. Marks appear above (or beside) each character.

Spaces get no marks. Extra line height leaves room for the symbols.

Emphasis preview
happy than right

text-emphasis: filled circle #dc2626

CSS Examples

Each snippet focuses on text-emphasis. Keep CSS lean so the shorthand is easy to study. Use Try It Yourself for a live editor.

Example 1 — Triangle Emphasis

Highlight a heading with red triangle marks.

CSS
<style>
  h2 {
    text-emphasis: triangle #dd5555;
  }
</style>

<h2>This is important!</h2>
Try It Yourself

How It Works

  1. Pick a shape. triangle selects filled triangles by default.
  2. Add a color. #dd5555 colors the marks, not the text.
  3. Per character. Each letter gets a mark; spaces stay empty.
  4. Inherited. Children keep these marks unless they override text-emphasis.

Example 2 — Sesame Marks

Sesame marks are common in vertical East Asian typography.

CSS
<style>
  .note {
    text-emphasis: filled sesame;
  }
</style>

<p class="note">重要ポイント</p>
Try It Yourself

How It Works

  1. Combine fill + shape. filled sesame draws solid sesame marks.
  2. Color optional. Without a color, marks follow the text color.
  3. Vertical default. In vertical writing modes, sesame is the default shape if none is given.
  4. Not underlines. This is different from text-decoration lines.

Example 3 — Custom String Mark

Use a single character string as the emphasis mark.

CSS
<style>
  .star {
    text-emphasis: "★" #ca8a04;
  }
</style>

<p class="star">Featured</p>
Try It Yourself

How It Works

  1. Quote one character. "★" becomes the mark for each letter.
  2. Add a color. The second value colors those marks.
  3. Avoid long strings. Multi-character strings may be truncated or ignored.
  4. Same shorthand. Style and color still travel together in one property.

Edge Cases & Pitfalls

If marks look wrong or missing, check these first.

spaces

Spaces get no marks

Emphasis is skipped on spaces and control characters. That is normal, not a bug.

height

Marks can grow line height

Symbols are about 50% of the font size. Tight leading may clip them or push lines apart.

string

One character only

Do not use multi-character strings like "foo". Browsers may show only the first grapheme.

position

Shorthand skips position

Setting text-emphasis never clears text-emphasis-position. Change position with that longhand.

vs line

Not a substitute for underline

For links and strike-throughs, use text-decoration. Emphasis marks are a different typographic tool.

Browser Support

text-emphasis is a browser text-decoration property. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available

text-emphasis

Interoperable across modern browsers since about March 2022. Internet Explorer does not support this property.

94% Modern browsers
Google Chrome 99+
Full
Mozilla Firefox 46+
Full
Apple Safari 7+
Full
Microsoft Edge 99+
Full
Opera 85+
Full
Samsung Internet 18+
Full
Internet Explorer No
None
text-emphasis Widely supported

Bottom line: Safe for modern sites. Older Safari supported prefixed forms; unprefixed interoperability is strong today. IE has no support.

Key Takeaways

  • Role: shorthand for emphasis mark style + color on each character.
  • Shapes: dot, circle, double-circle, triangle, sesame, or a string.
  • Inherited: yes. Does not reset text-emphasis-position.
  • Vs decoration: marks per character, not one line across the box.

One line: text-emphasis paints small marks on characters using style and color together.

Frequently Asked Questions

It is a shorthand that draws emphasis marks beside each character (except spaces and control characters). It sets text-emphasis-style and text-emphasis-color together.
The initial value is none for style and currentColor for color, so no marks appear until you set a style.
text-decoration does not inherit and draws one line across the element. text-emphasis inherits and places a mark on each character, so descendants can change the marks.
No. The shorthand intentionally leaves position alone. Change mark placement with text-emphasis-position when needed.
Yes. Pass a one-character string such as text-emphasis: "★" red. Do not use multi-character strings; browsers may truncate them.
It is Baseline Widely available (interoperable since about March 2022) in modern browsers. Internet Explorer does not support it. It is a browser rendering property, not a Node.js feature.

Next: text-emphasis-color

Learn the longhand that colors emphasis marks on their own.

text-emphasis-color tutorial →

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.

8 people found this page helpful