The text-decoration property is a shorthand for setting text-decoration-line, text-decoration-color, and text-decoration-style in one declaration. Omitted values are set to their initial values.

  • Initial valuenone
  • Applies toAll elements
  • InheritedNo
  • MediaVisual
  • Computed valueSee individual properties
  • AnimatableSee individual properties
  • CSS VersionCSS1, CSS2, CSS3
  • JavaScript
Formal syntax: <text-decoration-line> || <text-decoration-style> || <text-decoration-color>

text-decoration: underline dotted #3366FF;
a:hover {
   text-decoration: underline solid red;

Click the button below to experiment with this property.

Give it a Try!


Last updated on 23rd March 2014 By Rene Spronk

View All CSS Properties

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.