## CSS text-decoration Property
## Definition and Usage
The text-decoration property specifies the decoration added to text.
**Note:** The color of the decoration line will always be the same color as the text, unless specified otherwise.
**Note:** You can also have multiple values at once, like underline and overline.
**Note:** In CSS3, the text-decoration property is a shorthand for text-decoration-line, text-decoration-color, and text-decoration-style. However, for compatibility reasons, the old property definition (CSS level 2) is still valid.
## CSS Syntax
```css
text-decoration: text-decoration-line text-decoration-color text-decoration-style|initial|inherit;
```
**Note:** The text-decoration property is a shorthand for specifying the individual properties: text-decoration-line, text-decoration-color, and text-decoration-style.
## Property Values
| Value | Description |
|-------|-------------|
| text-decoration-line | Required. Specifies the type of text decoration, such as underline, overline, etc. |
| text-decoration-color | Optional. Specifies the color of the text decoration. |
| text-decoration-style | Optional. Specifies the style of the text decoration, such as solid, wavy, dotted, dashed, double. |
| initial | Sets the property to its default value. |
| inherit | Inherits this property from its parent element. |
## More Examples
### Example 1
Set the color, style, and position of the text decoration:
```html
p {
text-decoration: underline red;
}
This is some text.
```
### Example 2
Set the style and position of the text decoration:
```html
p {
text-decoration: underline wavy;
}
This is some text.
```
### Example 3
Show all possible text-decoration values:
```html
p.uppercase {
text-decoration: overline;
}
p.line-through {
text-decoration: line-through;
}
p.underline {
text-decoration: underline;
}
p.blink {
text-decoration: blink;
}
This is some text.
This is some text.
This is some text.
This is some text.
```
## Related Pages
CSS Tutorial: (
HTML DOM Reference: (
# Related Search Keywords
CSS text-decoration-color, CSS text-decoration-line, CSS text-decoration-style, CSS underline, CSS overline, CSS line-through, CSS text-decoration blink, CSS text-decoration property
# Related Video