Difference between revisions of "CSS GUIDE TEXT DECORATION"

From CDOT Wiki
Jump to: navigation, search
(Syntax)
m (Reverted edits by Janejoe (Talk) to last version by Sherman)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Summary ==
 
== Summary ==
The text decoration property is used to set text decoration (formatting) like bold, underline, italics etc.
+
The text decoration property is used to set text decoration (formatting) like underline, blink, line-through etc.
  
 
* Applies to: all
 
* Applies to: all
Line 9: Line 9:
  
 
== Syntax ==
 
== Syntax ==
TARGET_ELEMENT{text-decoration: ''value'' ;}
+
<pre>TARGET_ELEMENT{text-decoration: value ;}</pre>
  
 
== Legal Values ==
 
== Legal Values ==
 +
<table border="0">
 +
<tr>
 +
<td>'''none'''</td><td>''Specifies that no text decoration is to be used.''</td>
 +
</tr>
 +
<tr>
 +
<td>'''underline'''</td><td>''Underlines text.''</td>
 +
</tr>
 +
<tr>
 +
<td>'''overline'''</td><td>''Places a line over the text.''</td>
 +
</tr>
 +
<tr>
 +
<td>'''line-through'''</td><td>''Places a line(strike) through the text.''</td>
 +
</tr>
 +
<tr>
 +
<td>'''blink'''</td><td>''Causes the text to blink.''</td>
 +
</tr>
 +
</table>
  
 
== Mozilla Recommended Values ==
 
== Mozilla Recommended Values ==
  
 
== Usage Examples ==
 
== Usage Examples ==
 +
<pre>
 +
p{text-decoration: line-through;}
 +
 +
p{text-decoration: underline;}
 +
</pre>
  
 
== Notes ==
 
== Notes ==
Line 21: Line 43:
  
 
== Specification Conformance  ==
 
== Specification Conformance  ==
 +
[http://www.w3.org/TR/REC-CSS1#text-decoration CSS 1]<br />
 +
[http://www.w3.org/TR/REC-CSS2/text.html#propdef-text-decoration CSS 2.1 ]<br />
 +
CSS 3<br />
  
 
== Browser Compatibility ==
 
== Browser Compatibility ==
  
 
== See Also ==
 
== See Also ==

Latest revision as of 03:22, 23 April 2009

Summary

The text decoration property is used to set text decoration (formatting) like underline, blink, line-through etc.

  • Applies to: all
  • Inherited: no
  • Percentages: N/A
  • Media: visual
  • Computed value: as specified

Syntax

TARGET_ELEMENT{text-decoration: value ;}

Legal Values

noneSpecifies that no text decoration is to be used.
underlineUnderlines text.
overlinePlaces a line over the text.
line-throughPlaces a line(strike) through the text.
blinkCauses the text to blink.

Mozilla Recommended Values

Usage Examples

p{text-decoration: line-through;}

p{text-decoration: underline;} 

Notes

Specification Conformance

CSS 1
CSS 2.1
CSS 3

Browser Compatibility

See Also