The text-decoration-thickness property sets the stroke thickness of decoration lines—underline, overline, or line-through—created by text-decoration-line.
It is not inherited. The initial value is auto. Thickness alone is invisible until a line exists. For several decoration settings at once, prefer the text-decoration shorthand.
Note Former name: text-decoration-width
An early draft used text-decoration-width. The standard name is text-decoration-thickness—use that in new CSS.
Prefer em or % when the underline should grow with the font size.
Piece
Required?
Role
Decoration line
Yes
underline, overline, or line-through
Thickness value
Yes
How heavy that line is drawn
Color / style
Optional
Refine look without changing weight
Shorthand
Optional
text-decoration: underline solid red 3px
Try it
Live Preview
Change the underline thickness on a fixed sample. The line stays; only the stroke weight changes.
Needs a decoration line (already set). Color is red only so the thickness is easy to see.
Decoration preview
Confusion kissed me on the cheek
text-decoration-thickness: 3px
Code
CSS Examples
Each snippet focuses on text-decoration-thickness. A decoration line is included only so the thickness is visible. Use Try It Yourself for a live editor.
Example 1 — Browser Auto
Let the browser pick a thickness that fits the font.
Pick a relative unit.0.12em ties thickness to the element font size.
Scale together. Larger text gets a proportionally thicker line.
Percentages work too.10% refers to 1em of the same element.
Box-wide constant. Thickness stays one value for the whole box, even if children use a different font size.
Edge Cases & Pitfalls
If the line looks unchanged, check these first.
line
Thickness needs a decoration line
Without underline, overline, or line-through, changing thickness has no visible effect.
from-font
from-font may look like auto
If the font has no underline metrics, browsers fall back to auto. Not every font exposes preferred thickness.
%
Percentages are relative to 1em
They refer to the element font size, not the viewport. Support for percentages landed later than length values in some browsers.
shorthand
Shorthand can reset longhands
A later text-decoration rule can override a previous thickness. Watch cascade order.
name
Do not use text-decoration-width
That was an old draft name. Current CSS uses text-decoration-thickness only.
Compatibility
Browser Support
text-decoration-thickness is a browser text-decoration property. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
text-decoration-thickness
Interoperable across modern browsers since about March 2021. Internet Explorer does not support this property.
95%Modern browsers
Google Chrome89+
Full
Mozilla Firefox70+
Full
Apple Safari12.1+
Full
Microsoft Edge89+
Full
Opera75+
Full
Samsung Internet15+
Full
Internet ExplorerNo
None
text-decoration-thicknessWidely supported
Bottom line: Safe for modern sites. Percentage values reached wider Safari support later than length values; IE has no support.
Remember
Key Takeaways
Role: set how thick decoration lines are drawn.
Values:auto, from-font, length, or percentage.
Initial value:auto. Not inherited. Needs a decoration line first.
Scale tip: use em or % when thickness should follow font size.
One line:text-decoration-thickness controls the weight of an underline, overline, or line-through.
Frequently Asked Questions
It sets how thick decoration lines are, such as underlines, overlines, and line-throughs. A decoration line must already exist from text-decoration-line or the shorthand.
The initial value is auto. The browser chooses a thickness based on the font and decoration type.
If the font file includes preferred underline metrics, the browser uses that thickness. If not, it behaves like auto.
Use px for a fixed thickness. Use em or a percentage when you want the line to scale with the element font size. Percentages refer to 1em of the element font.
Yes. An earlier draft name was text-decoration-width. The standard name today is text-decoration-thickness.
It is Baseline Widely available (interoperable since about March 2021): Chrome/Edge 89+, Firefox 70+, Safari 12.1+. Internet Explorer does not support it. It is a browser rendering property, not a Node.js feature.