CSS Text - text-decoration
Description
Use the text-decoration property to add underline, overline and strike through to your text within html elements.
Default is
none
text-decoration: none;
text-decoration: underline;
text-decoration: overline;
text-decoration: line-through;
text-decoration: blink;
text-decoration: inherit;
See also: text-indent, text-align, text-transform, white-space.
Examples for text-decoration
Example 1:
An example showing underline:
Text with underline
<style>
#test { text-decoration: underline; }
</style>
<div id="test">Text with underline</div>
Example 2:
An example showing overline:
Text with overline
<style>
#test2 { text-decoration: overline; }
</style>
<div id="test">Text with overline</div>
Example 3:
An example showing line-through:
Text with line-through
<style>
#test3 { text-decoration: line-through; }
</style>
<div id="test3">Text with line-through</div>
Values for text-decoration
| text-decoration |
none underline overline line-through blink inherit |
Use the text-decoration property to add underline, overline and strike through to your text within html elements. |