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):
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.
- Easy to use with a learn-by-doing approach
- Offers quality content
- Gamified in-browser coding experience
- The price matches the quality
- Suitable for learners ranging from beginner to advanced
- Free certificates of completion
- Focused on data science skills
- Flexible learning timetable
- Simplistic design (no unnecessary information)
- High-quality courses (even the free ones)
- Variety of features
- Nanodegree programs
- Suitable for enterprises
- Paid Certificates of completion
- A wide range of learning programs
- University-level courses
- Easy to navigate
- Verified certificates
- Free learning track available
- University-level courses
- Suitable for enterprises
- Verified certificates of completion
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
, orsesame
- 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.