CSS COLOR

CSS Color Names

In CSS, a color can be specified by using a predefined color name:

The color property in CSS is used to set the color of HTML elements. Typically, this property is used to set the background color or the font color of an element.

we use color values for specifying the color. We can also use this property for the border-color and other decorative effects.

Example :-

<!DOCTYPE html>
<html>
<body>

<h1 style=”background-color:red;”>Tomato</h1>
<h1 style=”background-color:Orange;”>Orange</h1>
<h1 style=”background-color:Blue;”>DodgerBlue</h1>
<h1 style=”background-color:Green;”>MediumSeaGreen</h1>
<h1 style=”background-color:Gray;”>Gray</h1>
<h1 style=”background-color:Blue;”>SlateBlue</h1>
<h1 style=”background-color:Violet;”>Violet</h1>
<h1 style=”background-color:Gray;”>LightGray</h1>
</body>
</html>

CSS Background Color

You can set the background color for HTML elements:

Example 

<html>
<body>

<h1 style=”background-color:Blue;”>Hello World</h1>

<p style=”background-color:pink;”>
Reading is easier, too, in the new Reading view. You can collapse parts of the document and focus on the text you want. If you need to stop reading before you reach the end, Word remembers where you left off – even on another device.</p>

</body>
</html>

CSS text color 

You can set the color of text:

Example :- 

<html>
<body>

<h3 style=”color:Tomato;”>Hello World</h3>

<p style=”color:DodgerBlue;”>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>

<p style=”color:MediumSeaGreen;”>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>

</body>
</html>

 

CSS Border Color

You can set the color of borders:

Example :- 

Fun & Easy to follow
Works on all devices
Your own Pace
Super Affordable

Popular Videos

Play Video

UX for Teams

Learn the basics and a bit beyond to improve your backend dev skills.

ava4.png
Chris Matthews

Designer

Play Video

SEO & Instagram

Learn the basics and a bit beyond to improve your backend dev skills.

ava4.png
Chris Matthews

Designer