Styling Text - CSS Properties
CSS Text Decoration
There are 5 allowed values for the text-decoration property
- Property Usage
- text-decoration:value;
- Demonstration textnone;
- Demonstration textoverline;
- Demonstration textunderline;
- Demonstration textline-through;
- Demonstration textblink;
Value = none
No decoration is added to the text within the element this value is applied to and any decoration applied from parent elements will be removed.
Value = overline
A line above the text is applied to the element.
Value = underline
A line under the text is applied to the element.
Value = line-through
A line through the text is applied to the element.
This value is visually the same as the deprecated <strike> & <s> and the <del> HTML elements
Value = blink
The text this value is applied to blinks on & off.
Internet Explorer and Opera before Ver7 do not support this value
All these values will over-ride any text-decoration that may be applied from style definitions earlier in the document or styles applied to parent elements.
DHTML - Javascript Text Decoration
The text-decoration property can also be applied dynamically using javascript:
eg:
background-color becomes backgroundColor
margin-top becomes marginTop

