1. Background Color:
You can use the background-color property to apply background color to an HTML element (
Example:
<p style="background-color:yellow;"> This example uses the background-color property in a line. </p>
Output:
This example uses the background-color property in a line.
List of Background Color values as follows:
- Yellow
- Lightblue
- Lightgreen
- Pink
- Orange
- Gray
- White
- Black
2. Text Color:
You can use the color property to apply text color to an HTML element (
Example:
<p style="color:blue;"> This example shows text color. </p>
Output:
This example shows text color.
List of Text Color values as follows:
- Red
- Green
- Blue
- Black
- White
- Orange
- Purple
- Gray
3. Border Color:
You can use the border-color property to apply border color to an HTML element (
Example:
<p style="border:2px solid red;"> This element uses border color in a line. </p>
Output:
This element uses border color in a line.
List of Border Color values as follows:
- Red
- Green
- Blue
- Black
- White
- Orange
- Gray
- Purple
