Skip to content
Skip the list of specifications

text-decoration

matches Chrome on some values: 3 of 5 examples match Chrome

css-text-decor-4

Some of the examples match Chrome and some do not: the count says how many, and the values that differ are listed first, each with its difference map.

The 2 that do not: text-decoration:spelling-error, text-decoration:grammar-error. They come first below, each with its difference map.

What the specification says

Initial valuesee individual properties
Applies tosee individual properties
Inheritedsee individual properties
Percentagessee individual properties
Computed valuesee individual properties
Syntax<'text-decoration-line'> || <'text-decoration-thickness'> || <'text-decoration-style'> || <'text-decoration-color'>

The definition in css-text-decor-4

The measurements

5 examples: two render differently and come first and three match Chrome. Each is one declaration on a small page, drawn by Chrome and by our engine. Drag on a picture to move the line between them.

text-decoration:spelling-error

parsed, no effect
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome2,046
The same, on the page without the declaration1,402
Largest difference on one colour channel178 of 255
The same, on the page without the declaration45 of 255

Our page is the same with and without the declaration; Chrome’s page changes.

The example’s page

text-decoration:grammar-error

parsed, no effect
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome1,834
The same, on the page without the declaration1,402
Largest difference on one colour channel76 of 255
The same, on the page without the declaration45 of 255

Our page is the same with and without the declaration; Chrome’s page changes.

The example’s page

text-decoration:line-through

same effect as Chrome
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome1,270
The same, on the page without the declaration1,402
Largest difference on one colour channel45 of 255
The same, on the page without the declaration45 of 255

The pages differ by 1,270 pixels with the declaration and by 1,402 without it: what differs is there before the property (mostly the fonts), and the declaration does not add to it.

The example’s page

text-decoration:overline

same effect as Chrome
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome1,402
The same, on the page without the declaration1,402
Largest difference on one colour channel45 of 255
The same, on the page without the declaration45 of 255

The pages differ by 1,402 pixels with the declaration and by 1,402 without it: what differs is there before the property (mostly the fonts), and the declaration does not add to it.

The example’s page

text-decoration:underline

same effect as Chrome
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome1,402
The same, on the page without the declaration1,402
Largest difference on one colour channel45 of 255
The same, on the page without the declaration45 of 255

The pages differ by 1,402 pixels with the declaration and by 1,402 without it: what differs is there before the property (mostly the fonts), and the declaration does not add to it.

The example’s page

Which values were measured

A match on one example means a match at the value tried. The property’s grammar has 21 branches, and 5 of them carry a measurement.

ValueMeasured
underline
same effect as Chrome
overline
same effect as Chrome
line-through
same effect as Chrome
blinknot measured
spelling-error
parsed, no effect
grammar-error
parsed, no effect
from-fontnot measured
20pxnot measured
50%not measured
hairlinenot measured
thinnot measured
mediumnot measured
thicknot measured
solidnot measured
doublenot measured
dottednot measured
dashednot measured
wavynot measured
#e07a1fnot measured
nonenot measured
autonot measured

Tests that name this property

2 web-platform-tests link to this property’s definition. Few tests carry such a link, so a short list says little about the property.

Measured against Chrome 148.0.7778.96 on 5 November 2026, with up to 40 candidate values tried per property. How it was measured