Computer >> Computer tutorials >  >> Programming >> Javascript

Usage of text-decoration property in CSS


The text-decoration property is used to underline, overline, and strikethrough text.

Example

The following example demonstrates how to decorate a text. Possible values are none, underline, overline, line-through, blink.

<html>
   <head>
   </head>
   <body>
      <p style = "text-decoration:underline;">
         This will be underlined
      </p>
      <p style = "text-decoration:line-through;">
         This will be striked through.
      </p>
      <p style = "text-decoration:overline;">
         This will have a over line.
      </p>
      <p style = "text-decoration:blink;">
         This text will have blinking effect
      </p>
   </body>
</html>