CSS text-decoration
The CSS text-decoration
property is used to style the decoration of text. It can be used to add lines, such as underlines or strikethroughs, to text.
Examples
In the example above, the CSS property text-decoration: underline;
is used to add an underline to the text.
Values
The text-decoration
property accepts the following values:
Value | Description |
---|---|
none |
No decoration is added to the text. |
underline |
Adds an underline to the text. |
overline |
Adds a line above the text. |
line-through |
Adds a line through the text. |
These values can be used in combination to apply multiple decorations to the text.