CSS Color Property

CSS color property used to give color to text

1 - Color Name

Name of color some are 

1-red

2-green

3-blue

4-lightblue

5-pink

6-violet

7-black

Example 01

<!--****************index.html file**********/

<h1> how use color name property</h1>

CSS file

/****************this is style.css file********************/

/*************Use color *********/

h1{

color:red;

}

Try above code

Example02

!<--****************This is index.html file

<!--*****************another example ********-->

<p> This is another example to use of color</p>

CSS file

/*********this is another example of  color ****/

p{

color:pink;

}

Try above code



HEX Color property

Hex color start with # symbol

Example 01

<!--*************this is index.html file***********-->

<h2> This is heading 2 tag </h2>

<p> This is paragrph </p>

CSS file

/**********this is style.css file*************/

h2{

color:#f1f1f1;

}

p{

color:#ff2f2f;

}

Try above code



HSL Color Property