Home of web learners


Color is a very important things in designing

In css there is a huge use of colors.It can be used in text,it can be used in webpage background

There are many ways you can give colors to your element

One is giving color name


h1 { color:green; }

Here we use color name and its works as its color name

There are many color like gray,blue,purple,lime

Second one is using rgb value,sometimes we found some custom color which doesn't have any color names,then we can use rgb value of them

This is an example:

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

Here we use rgb to give color value,rgb means red,green,blue.First value is for red,second one is for green,third one is for blue

Highest value we can use 255,which is the highest intensity of the color,like here we use 255 for green for best green value.

Lower value means lower intenstiy of the color

We can give different kind of value for them and mixing up red,green,blue color.We can find our custom color from here,as all color is made of red,green,blue.

We can use this color value in different kind of color properties for the tag like for background-color

Lets look an example:

p { background-color: green; }


This is a text

Here,we use background-color properties for p tag


About webn3rd