Name
textDecoration — NN n/a IE 4 DOM n/a
Synopsis
Read/Write
Specifies additions to the text content of the element in the form of
underlines, strikethroughs, overlines, and (in Navigator and CSS)
blinking. You may specify more than one decoration style by supplying
values in a space-delimited list. While Internet Explorer 4 accepts
the blink value, it does not blink the text. Text
decoration has an unusual parent-child relationship. Values are not
inherited, but the effect of a decoration carries over to nested
items. Therefore, unless otherwise overridden, an underlined
P element underlines a nested B
element within. Internet Explorer also includes properties for each
decoration type.
Example
document.all.emphasis.style.textDecoration = "underline"
Value
In addition to none, any of the following four
constants (as a string): blink |
line-through | overline |
underline. Multiple values may be included in the
string as a space-delimited list.
Default
None.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access