+91-7906818313 / +91-7500893874 Monday - Sunday 10:00am - 06:00pm
Change The Color of Text | Use of CSS With HTML

Change The Color of Text | Use of CSS With HTML

Change The Color of Text

Like Us on Facebook to get more updates





The color property is used to set the color of text. If you want to change the text color then you use this CSS code which is given below.

Syntax:

body{color:blue;}

h1{color:#00f00;}

h2{color:rgb(255,0,0);}





Example:

 

<html>

    <head>

        <style type="text/css">

            h1

            {

                color: blue;

            }

        </style>

    </head>

    <body>

        <h1>

            This is a heading.

        </h1>

        <p>

            This is a paragraph.

        </p>

    </body>

</html>

 




Output:

text-color-change-by-css



Leave a Reply

Close Menu
Translate »