CSS text-emphasis Property
Example
Use of the text-emphasis property:
p.ex1 {
text-emphasis: filled;
}
p.ex2 {
text-emphasis: open;
}
p.ex3 {
text-emphasis: double-circle red;
}
p.ex4 {
text-emphasis: triangle blue;
}
Try it Yourself »
More "Try it Yourself" examples below.
Definition and Usage
The text-emphasis property is used to apply
emphasis marks to text.
The text-emphasis property is a shorthand for setting text-emphasis-style and
text-emphasis-color in one declaration.
Tip: The size of the emphasis symbol is about 50% of the size of the font.
| Default value: | none |
|---|---|
| Inherited: | no |
| Version: | CSS3 |
| JavaScript syntax: | object.style.textEmphasis="filled blue" |
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Numbers followed by -webkit- specify the first version that worked with a prefix.
| Property | |||||
|---|---|---|---|---|---|
| text-emphasis | 99.0 | 99.0 | 46.0 | 7.0 | 15.0 -webkit- |
CSS Syntax
text-emphasis:
none|filled|open|dot|circle|double-circle|triangle|sesame|string|color;
| Value | Description | |
|---|---|---|
| none | No emphasis marks are applied | Demo ❯ |
| filled | The emphasis marks are filled with a solid color | Demo ❯ |
| open | The emphasis marks are hollow | Demo ❯ |
| dot | The emphasis marks are small circles | Demo ❯ |
| circle | The emphasis marks are circles | Demo ❯ |
| double-circle | The emphasis marks are double circles | Demo ❯ |
| triangle | The emphasis marks are triangles | Demo ❯ |
| sesame | The emphasis marks are sesames | Demo ❯ |
| string | The emphasis marks are the given string (one character) | Demo ❯ |
| color | Sets the color of the emphasis marks | Demo ❯ |