This topic has not yet been rated - Rate this topic

textDecorationUnderline Property

Sets or retrieves whether the text in the object is underlined.

Syntax

HTML N/A
Scripting [ bUnderline = ] object.style.textDecorationUnderline

Possible Values

bUnderline Boolean that specifies or receives one of the following values.
true
Apply the underline.
false
Prevent the underline.

The property is read/write. The property has no default value. The Cascading Style Sheets (CSS) attribute is not inherited.

DHTML expressions can be used in place of the preceding value(s). As of Internet Explorer 8, expressions are supported in IE7 Standards mode and IE5 (Quirks) mode only. For more information, see About Dynamic Properties and Defining Document Compatibility.

Example

This example uses the textDecorationUnderline property to underline the text when the user clicks the text with the mouse.


<P onclick="this.style.textDecorationUnderline=true;">
Click this if you think it's important.
</P>

Standards Information

There is no public standard that applies to this property.

Applies To

A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, CUSTOM, DD, defaults, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FORM, hn, HTML, I, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP, CSSRuleStyleDeclaration Constructor, CSSStyleDeclaration Constructor

See Also

textDecoration
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ