CSS text-emphasis-color property
- Previous Page text-emphasis
- Next Page text-emphasis-position
Definition and Usage
text-emphasis-color
attribute sets the color of the emphasis mark.
Tip:unless the text-emphasis-style attribute, otherwise the emphasis mark will not be displayed.
Example
Use the text-emphasis-color property:
p.ex1 { text-emphasis-color: red; } p.ex2 { text-emphasis-color: blue; } p.ex3 { text-emphasis-color: rgb(130, 180, 150); } p.ex4 { text-emphasis-color: currentcolor; }
CSS Syntax
text-emphasis-color: color|inherit|initial;
Attribute Value
Value | Description |
---|---|
color |
Sets the color of the emphasis mark. If a color is not specified, currentcolor is used. |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical Details
Default Value: | currentcolor |
---|---|
Inheritance: | yes |
Version: | CSS3 |
JavaScript Syntax: | object.style.textEmphasisColor="blue" |
Browser Support
The numbers in the table represent the first browser version to fully support this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
99.0 | 99.0 | 46.0 | 7.0 | 85.0 |
- Previous Page text-emphasis
- Next Page text-emphasis-position