This property describes the appearance characteristics of text that are not
specified with the 'font-style' and
'font-weight' properties. The color of the
text-decoration is taken from the 'color' property for the element. The
characteristics of this property ARE used by child elements if the
parent element is set to block. If this property is specified for an element/section
containing no text (like the IMG element) or is empty, this property has
no effect. Browsers may treat unknown values as underline.
Allowed Values
inherit
CSS2
Type: Explicit
Description:
Explicitly sets the value of this property to that of the parent.
none
CSS1 | CSS2
| IE3B1 | N4B3
| O3.5
Type: Explicit
Description:
This adds no decoration to the section.
underline
CSS1 | CSS2
| IE3B1 | N4B2
| O3.5
Type: Explicit
Description:
The text in the section will be underlined.
overline
CSS1 | CSS2
| IE4B1
Type: Explicit
Description:
The text in the section should have a line at the top of the text.
line-through
CSS1 | CSS2
| IE3B1 | N4B2
| O3.5
Type: Explicit
Description:
The text in the section will have a line through the middle (strikethrough text.)
blink
CSS1 | CSS2
| N4B2
Type: Explicit
Description:
The text in the section blinks.
Example
Ext/Doc: strong {
text-decoration: overline }
In-Line: <strongSTYLE="text-decoration: overline">this
is a test</strong>
Notes
CSS1 Conformance: Browsers may ignore the "blink"
value and still be considered CSS1 conformant.
Browser Peculiarities
Internet Explorer
3.0:
- Multiple, space-separated values are not understood. The
entire property value is ignored.
3.0+:
- The effects of 'text-decoration' are not always used by child
elements as they should be (they are ignored most of the time.)
When they are honored (such as when a generic SPAN controlling text
color is nested inside), the characteristics of the original
decoration are not honored, rather the child element's style is used.
Netscape
4.0 Beta 2:
- This version had a default 'text-decoration' value of 'underline' -
which makes the values of 'none' and 'overline' into underlined
passages. The correct behavior occurs in subsequent releases.
4.x:
- The effects of 'text-decoration' are not always used by child
elements as they should be (they are ignored most of the time.)
When they are honored (such as when a generic SPAN controlling text
color is nested inside), the characteristics of the original
decoration are not honored, rather the child element's style is used.
- Applying styles to hyperlink Pseudo-classes applies the styles to
all hyperlinks.
Opera
3.5:
- The effects of 'text-decoration' are not always used by child
elements as they should be (they are ignored most of the time.)
When they are honored (such as when a generic SPAN controlling text
color is nested inside), the characteristics of the original
decoration are not honored, rather the child element's style is used.
- Applying styles to hyperlink Pseudo-classes applies the styles to
all hyperlinks.
- Text decoration values of "none" and "underline" set for hyperlinks
do not work as expected - User preferences for hyperlink underlining
are used instead.