It’s Festive Season! Enjoy 30% Off

Use code FESTIVE30 at checkout

Code has been added to clipboard!

CSS Text Emphasis

Reading time 1 min
Published Aug 8, 2017
Updated Sep 27, 2019

Emphasizing text in CSS

By using the CSS text-emphasis property, you can draw attention to textual elements (letters, numbers, but not spaces or control characters):

Example
p {
    text-emphasis: filled sesame;
    -webkit-text-emphasis: filled sesame;
}

The text emphasis symbols are about a half the font size. It can also affect line height.

How to use CSS emphasis

CSS text-emphasis is actually a shorthand for two subproperties:

  • text-emphasis-style
  • text-emphasis-color

Therefore, the syntax is similar to that of many other shorthands:

text-emphasis: style color;

The CSS text emphasis style can be defined in:

  • Keywords: none (the default value), filled, open, dot, circle, double-circle, triangle, or sesame
  • A string containing one character that will be used as the CSS emphasis symbol

You can define the CSS text emphasis color using a name, RGB, RGBA, HEX, HSL or HSLA value. If you don't specify the color, CSS text emphasis will use the color of the text.

Tip: to get the value for the exact color tone you need, use the Pickeristic color picker.

Browser support

Browser image
Chrome
25+
Browser image
Edge
-
Browser image
Firefox
46+
Browser image
IE
-
Browser image
Opera
15+
Browser image
Safari
6.1+

Mobile browser support

Browser image
Chrome
25+
Browser image
Firefox
46+
Browser image
Opera
14+
Browser image
Safari
7+