CSS text-decoration-line property
HTML CSS

CSS text-decoration-line property

Editorial Team
Editorial Team

Follow us on Discord or Telegram to get access to free tutorials and updates.

text-decoration-line

The text-decoration-line property is used to specify the type of the text-decoration to be used. It can have the following values:

Values

ValueDefinition
overlineDisplays a line over the text.
underlineDisplays an underlne for the text
line-throughDisplays a line through the text

This is an underlined text.

Example

<p style="text-decoration-line:overline">Text overline</p>
<p style="text-decoration-line:underline">Text underline</p>
<p style="text-decoration-line:line-through">Text line-through</p>

Output

Text overline

Text underline

Text line-through

You can also use the shorthand text-decoration property instead.