Courses

Chapter 4


CSS Colors


Colors are specified using predefined color names, or RGB, HEX, HSL, RGBA, HSLA values.


CSS Color Names

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

Tomato,Orange,DodgerBlue,MediumSeaGreen,Gray,SlateBlue,Violet

CSS Background Color

You can set the background color for HTML elements:

Hello World


Immunity is the ability of the body to defend itself against disease – causing organisms. Everyday our body comes in contact with several pathogens, but only a few results into diseases. 

Example

<h1 style="background-color:DodgerBlue;">Hello World</h1>
<p style="background-color:Tomato;">Lorem ipsum...</p>

Example in Html

Hello World

 Immunity is the ability of the body to defend itself against disease – causing organisms. Everyday our body comes in contact with several pathogens, but only a few results into diseases. 

 CSS Text Color

You can set the color of text:

Hello World

Immunity is the ability of the body to defend itself against disease – causing organisms. Everyday our body comes in contact with several pathogens, but only a few results into diseases. 

Example

<h1 style="color:Tomato;">Hello World</h1>
<p style="color:DodgerBlue;">Lorem ipsum...</p>
<p style="color:MediumSeaGreen;">Ut wisi enim...</p>

Example in html 

Hello World

Immunity is the ability of the body to defend itself against disease – causing organisms. Everyday our body comes in contact with several pathogens, but only a few results into diseases. 

 Immunity is the ability of the body to defend itself against disease – causing organisms. Everyday our body comes in contact with several pathogens, but only a few results into diseases. .