How To Underline Text Using CSS | Use of CSS With HTML

introduction-of-css

How To Underline Text Using CSS

Like us on facebook to get more updates.





If you want to learn that how can you underline text using CSS then you should read this article till end. Here we will explain you that how can you underline text using CSS.

Text Decoration:

The text-decoration property is used to set or remove decorations from text. Here text-decoration properties are given below which are use for underline text.

  • None
  • Overline
  • Line-through
  • Underline

Syntax:

ElementSelector{

                text-decoration:none;

                text-decoration:overline;

                text-decoration:line-through;

                text-decoration:underline;

}





Example:

<html>

    <head>

        <style type="text/css">

            h1{

                text-decoration:none;

            }

            h2{

                text-decoration:overline;

            }

            h3{

                text-decoration:line-through;

            }

            h4{

                text-decoration:underline;

            }

        </style>

    </head>

    <body>

        <h1>This is 1st heading.</h1>

        <h2>This is 2nd heading.</h2>

        <h3>This is 3rd heading.</h3>

        <h4>This is 4th heading.</h4>

    </body>

</html>





Output:

text-decorationIf you want to learn Java programming language then you should download this app Click Here




Leave a Reply

Your email address will not be published. Required fields are marked *