text-decoration
Specifies text decoration.
Sample Code
p.test { text-decoration: none;}
p.test1 { text-decoration: underline;}
p.test2 { text-decoration: overline;}
p.test3 { text-decoration: line-through;}
p.test4 { text-decoration: blink;}
Available Values
| Value | Description |
|---|---|
| none | No text decoration. This 'none' is the initial value. |
| underline | Adds an underline to the text. |
| overline | Adds a line above the text. |
| line-through | Adds a strikethrough to the text. |
| blink | Makes the text blink. This 'blink' value is scheduled for removal in the CSS specification and cannot be used in almost all current browsers. Please be aware of this. |
Browser Display Result
<p style="text-decoration: none;">This is a p element.</p>
<p style="text-decoration: underline;">This is a p element.</p>
<p style="text-decoration: overline;">This is a p element.</p>
<p style="text-decoration: line-through;">This is a p element.</p>
<p style="text-decoration: blink;">This is a p element.</p>
Browser Compatibility
Desktop
Supported in all versions
8 ○
7 ○
6 ○
2 and earlier ×Mobile
Android Browser
4.4+ ○
3 and earlier ×Same support as desktop
Same support as desktop
※ Version data is based on MDN.
Details
Specifies text decoration.
Note that the 'blink' value is scheduled for removal in the CSS specification and cannot be used in almost all current browsers.
If you find any errors or copyright issues, please contact us.