Gets or sets a value that indicates whether the text in the object has blink, line-through, overline, or underline decorations.
HRESULT IHTMLStyle::get_textDecoration(BSTR *p);HRESULT IHTMLStyle::put_textDecoration(BSTR v);
- Pointer to a variable of type BSTR that receives one of the values listed in Possible Values.
- BSTR that specifies one of the values listed in Possible Values.
none Default. Text has no decoration. underline Text is underlined. overline Text has a line over it. line-through Text has a line drawn through it. blink Not implemented.
Returns S_OK if successful, or an error value otherwise.
The default value is different for the following tags.
- Default value is
underlinefor a when used with href, u, and ins.
- Default value is
line-throughfor strike, s, and del.
If the value
noneis placed at the end of the values, all values are cleared.
If the object has no text (for example, the img object in HTML) or is an empty object (for example, "<EM></EM>"), this property has no effect.
If you set the IHTMLStyle::textDecoration attribute to
noneon the body object, the a objects are still underlined. To remove the underline from the a objects, either set the style inline or use a as a selector in the global style sheet.
Specifying the IHTMLStyle::textDecoration property for block elements affects all inline children. If it is specified for, or affects, an inline element, it affects all boxes generated by the element.
blinkpossible values are available as of Microsoft Internet Explorer 4.0. Although
blinkis exposed, it is not rendered.
In Windows Internet Explorer 8 and later, when the IHTMLStyle::textDecoration property is set to
underline, the line will remain at the same vertical level and the same thickness across all child elements of the parent element on which the text decoration has been set. (This does not apply to the
line-throughvalue.) In Internet Explorer 7 and earlier, the text decoration adjusts to correspond to the size and thickness of each child element.