MDN The text-decoration-insetCSS property enables adjusting the start and end points of an element's text decoration so it can be shortened, lengthened, or have its position shifted with respect to the rendered text.
MDN The text-decoration-skipCSS property sets what parts of an element's content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors.
Live previewExample from MDN
p { margin: 0; font-size: 3em; text-decoration: underline; text-decoration-skip: edges;}
<p>Hey, grab a cup of <em>coffee!</em></p>
Syntax
none | auto
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
PropertyBaseline: widely availablesince January 2018
MDN The text-decoration-styleCSS property sets the style of the lines specified by text-decoration-line. The style applies to all lines that are set with text-decoration-line.
Live previewExample from MDN
p { font: 1.5em sans-serif;}#example-element { text-decoration-line: underline;}
<section id="default-example"> <p> I'd far rather be <span class="transition-all" id="example-element">happy than right</span> any day. </p></section>
Syntax
solid | double | dotted | dashed | wavy
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
solid
Applies to
all elements
Inherited
no
Percentages
n/a
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete
Browser support
First browser version supporting text-decoration-style
Chrome
57
Edge
79
Firefox
36
Safari
12.1
Chrome Android
57
Safari iOS
12.2
First version with support, from MDN browser-compat-data.
PropertyBaseline: widely availablesince January 2018
MDN The text-decoration-thicknessCSS property sets the stroke thickness of the decoration line that is used on text in an element, such as a line-through, underline, or overline.
Live previewExample from MDN
p { font: 1.5em sans-serif; text-decoration-color: red;}
<section id="default-example"> <p id="example-element"> Confusion kissed me on the cheek, and left a taste so bittersweet </p></section>
Syntax
auto | from-font | <length-percentage> | <line-width>
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
auto
Applies to
all elements
Inherited
no
Percentages
N/A
Computed value
as specified, with <length-percentage> values computed
Canonical order
per grammar
Animation type
by computed value
Browser support
First browser version supporting text-decoration-thickness
Chrome
89
Edge
89
Firefox
70
Safari
12.1
Chrome Android
89
Safari iOS
12.2
First version with support, from MDN browser-compat-data.
PropertyBaseline: widely availablesince September 2024
MDN The text-emphasis-positionCSS property sets where emphasis marks are drawn. Similar to the text rendered by the <ruby> HTML element, if there isn't enough room for emphasis marks, the line height is increased.
Live previewExample from MDN
p { font: 1.5em sans-serif;}#example-element { text-emphasis: filled double-circle #ffb703;}
<section id="default-example"> <p> I'd far rather be <span class="transition-all" id="example-element">happy than right</span> any day. </p></section>
Syntax
[ over | under ] && [ right | left ]?
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
over right
Applies to
text
Inherited
yes
Percentages
n/a
Computed value
specified keyword(s)
Canonical order
per grammar
Animation type
discrete
Browser support
First browser version supporting text-emphasis-position
Chrome
99
Edge
99
Firefox
46
Safari
7
Chrome Android
99
Safari iOS
7
First version with support, from MDN browser-compat-data.
PropertyBaseline: widely availablesince January 2018
MDN The text-shadowCSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied to the text and any of its text-decoration. Each shadow is described by some combination of X and Y offsets from the element, blur radius, and color.
Live previewExample from MDN
p { font: 1.5em "Georgia", serif;}
<section id="default-example"> <p id="example-element"> Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy... </p></section>
Syntax
none | <shadow>#
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
none
Applies to
text
Inherited
yes
Percentages
n/a
Computed value
either the keyword none or a list, each item consisting of four absolute lengths plus a computed color and optionally also an inset keyword
Canonical order
per grammar
Animation type
as shadow list
Browser support
First browser version supporting text-shadow
Chrome
2
Edge
12
Firefox
3.5
Safari
1.1
Chrome Android
18
Safari iOS
1
First version with support, from MDN browser-compat-data.
MDN The text-underline-offsetCSS property sets the offset distance of an underline text decoration line (applied using text-decoration) from its original position.
Live previewExample from MDN
p { font: 1.5em sans-serif; text-decoration-line: underline; text-decoration-color: red;}
<section id="default-example"> <p id="example-element">And after all we are only ordinary</p></section>
Syntax
auto | <length-percentage>
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
auto
Applies to
all elements
Inherited
yes
Percentages
N/A
Computed value
as specified, with <length-percentage> values computed
Canonical order
per grammar
Animation type
by computed value
Browser support
First browser version supporting text-underline-offset
Chrome
87
Edge
87
Firefox
70
Safari
12.1
Chrome Android
87
Safari iOS
12.2
First version with support, from MDN browser-compat-data.
PropertyBaseline: widely availablesince January 2023
MDN The text-underline-positionCSS property specifies the position of the underline which is set using the text-decoration property's underline value.
Live previewExample from MDN
p { font: 1.5em sans-serif;}#example-element { text-decoration-line: underline;}
<section id="default-example"> <p> <span class="transition-all" id="example-element" >C<sub>8</sub>H<sub>10</sub>N<sub>4</sub>O<sub>2</sub></span > is the chemical formula for caffeine. </p></section>
Syntax
auto | [ from-font | under ] || [ left | right ]
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
auto
Applies to
all elements
Inherited
yes
Percentages
n/a
Computed value
specified keyword(s)
Canonical order
per grammar
Animation type
discrete
Browser support
First browser version supporting text-underline-position
Chrome
33
Edge
12
Firefox
74
Safari
12.1
Chrome Android
33
Safari iOS
12.2
First version with support, from MDN browser-compat-data.