← TechnologyThe essentials of

Why text-decoration: none on a child does not remove every line

Publisher: ResumeMaker • 1 source

Published: 22 Oct 2026 13:13 · Updated: 22 Oct 2026 13:13

AI source check: 21 Oct 2026 13:48. This is not editorial approval.

In a few sentences

In brief

The decoration by the parent can continue through the text of the descendant.

Useful to know

text-decoration sets lines as underlining and crossing. Decoration applied to a parent is distributed according to certain rules through its content and is not removed simply with none on a nested child. [1]

For example, span in an already highlighted paragraph may remain below the line, despite its own text-decoration: none. The correction is to place the decoration on the exact elements that should have it. When connected, keep a reliable visual sign of interactivity. Too general a rule on a container is often more difficult for a subsequent shutdown.

Sources

For further detail and to check the information:

  1. [1] MDN — text-decoration ↗