The text-decoration CSS property is used to set the text formatting to underline, overline, line-through or blink.
Underline and overline decorations are positioned under the text, line-through over it.
Values
Accepts one or more whitespace separated values:
none
Produces no text decoration.
underline
Each line of text is underlined.
overline
Each line of text has a line above it.
line-through
Each line of text has a line through the middle.
blink
Text blinks. Browsers may ignore this value (without making the declaration invalid), as Internet Explorer and Safari does.
<!doctype html> <html> <head> <title>CSS Tutorials</title> <style type="text/css"> .p1 { text-decoration: line-through; } .p2 { text-decoration: underline overline; } </style> </head> <body> <p class="p1"> The quick brown red fox jumps over the lazy dog </p> <p class="p2"> The quick brown red fox jumps over the lazy dog </p> </body> </html>