clock  Mon - Sun 8.00 AM - 8.00 PM
mail  edu@teknowize.com
fb
instagram
play store
pinterest

More

CSS Text Color

Imperial Advance Hero Image

CSS Text Color

It is use to set the color of text.

 

Syntax -

color:value;

 

values

color names

RGB color

HEX color HSL color
HSLA Color  

 

For example -

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Text Color</title>

    <style>
        h1 {
            color: rgb(0, 81, 255);
        }

        h2 {
            color: lime;
        }
    </style>
</head>

<body>
    <h1>welcome to teknowize</h1>
    <h2>Learn Programming</h2>
</body>

</html>

 

Output

text color

CSS