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.

Udacity
Pros
  • Simplistic design (no unnecessary information)
  • High-quality courses (even the free ones)
  • Variety of features
Main Features
  • Nanodegree programs
  • Suitable for enterprises
  • Paid certificates of completion
Coursera
Pros
  • Professional service
  • Flexible timetables
  • A variety of features to choose from
Main Features
  • Professional certificates of completion
  • University-level courses
  • Multiple Online degree programs
Datacamp
Pros
  • Great user experience
  • Offers quality content
  • Very transparent with their pricing
Main Features
  • Free certificates of completion
  • Focused on data science skills
  • Flexible learning timetable

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+

Latest Udacity Coupon Found:

Verified STAFF PICK

75% OFF COURSES

Udacity Black Friday Offer

The best time to save on Udacity courses is now - follow this coupon to access a 75% Udacity Black Friday discount & enjoy learning at a very low cost!

Expiration date: 18/01/2021
3176 People Used
Only 97 Left
Rating
5.0