Text Decoration
Text Decoration
The text-decoration: value;
property specifies the appearance of decorative lines on text. The most common text-decoration are:
text-decoration-line
- Sets the kind of text decoration to use such as, underline, overline, line-through.text-decoration-color
- Sets the color of the text decoration.text-decoration-style
- Sets the style of the text decoration such assolid
,wavy
,dotted
,dashed
, ordouble
.
Examples
Multiple Text Decorations
Setting different text decorations for a <h1>
element.
h2 {
text-decoration: underline overline wavy blue;
}
Overline text decoration
Setting an overline text decoration for a <h1>
element.
h1 {
text-decoration: overline;
}
Syntax
text-decoration: value;
Tips
- You may combine different kinds of text decorative in one statement.
- The default value is no text decoration.
Additional Information
For more information, see http://www.w3schools.com/cssref/pr_text_text-decoration.asp.
Found a bug in the documentation? Let us know at support@code.org.