CSS Colors
There are many commands in CSS to set the colors of the text, backgroud etc. to make the web page look like you want it to. The value can be set either as a rgb value, hexadecimal number or a color name.Set Text Color
The color property can set the color of your text. The value of color property can be set either as a rgb value, hexadecimal number or a color name. Example:Output:The color is specified as an rgb value
The color is specified as a hexadecimal valueThe color name is specified
The color is specified as an rgb value
The color is specified as a hexadecimal valueThe color name is specified
Highlight Text
To highlight a text, i.e. to set the background color of a text, background-color property is used.Example:
Output: The highlighted color of this text is mentioned in grbThe highlighted color of this text is mentioned in hexThe color of this highlighted text is mentioned
The highlighted color of this text is mentioned in grbThe highlighted color of this text is mentioned in hexThe color of this highlighted text is mentioned
Set Background Color
You can set the background color of any element by using the property, background-color. If you need to set the background color of the web page, use background-color property in the element.Example:
The example above must be quite clear. One thing new must be the color, transparent. This is the default background color.The background color is set to yellow. This paragraph is green
This division is transparent
Output:
The background color is set to yellow.This paragraph is green
This division is transparent
