text-decoration

The text-decoration property specifies decorations that are added to the text of an element.

Syntax

text-decoration: none | [ underline || overline || line-through || blink ] | inherit
Initial: none
Applies To: all elements
Inherited: no
Percentages: NA
Media: visual

Values

text-decoration: value
Value Description
blink Alternates between visible and invisible text
line-through Line through text
none No text decoration
overline Line above text
underline Line below text

DOM

[window.]document.getElementById("element-id").style.textDecoration = "text-decoration";

Example | line-through

Example | none

Example | overline

Example | underline

Example | DOM

External

W3C Cascading Style Sheets, level 1

W3C Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification