×

Html & Html5

The World's best Software Development Study Portal

CSS3

Introduction to CSS


CSS colors



Giving colors to any element is the main work of CSS colors. And these colors we can specify through colors name , HEX values and RGB values etc.
   We can use these colors for changing the :-



Background color :-

Due to this property we can able to change the background-color of the elements.

Let's understand this by following program:-

<!DOCTYPE html>

<html>

<head>

</head>

<body>

<p style="background-color:pink"> Let's see here </p>

<p id="main"> I am Manish Singh Bhakuni </p>

</body>

</html>

We can also define the CSS through internal or external method. And the value of color we can also set through RGB, HEX values.



Output of the Program



Let's see here

I am Manish Singh Bhakuni



Text color :-

Due to this property we can also able to change the text-color of the elements.

Let's understand this by following program:-

<!DOCTYPE html>

<html>

<head>

</head>

<body>

<p style="color:red" > Let's see here </p>

<h2 style="color:green" > I am Manish Singh Bhakuni </h2>

</body>

</html>

Output of the Program



Let's see here

I am Manish Singh Bhakuni



Border color :-

Due to this property we can also able to change the border-color of the border tag.

Let's understand this by following program:-

<!DOCTYPE html>

<html>

<head>

</head>

<body>

<p style="border:2px solid red">Let's see here </p>

<h2 style="color:green">I am Manish Singh Bhakuni </h2>

</body>

</html>

Output of the Program



Let's see here

I am Manish Singh Bhakuni



Here we got our red color border.








CSS 3 training insitute | Best IT Training classes in Gurgaon | Web Designing Training Institute