CSS color
The CSS color property is used to set the color of text and background in a web page. You can specify colors in CSS using different formats like color names, hexadecimal values, RGB values, HSL values, or RGBA values.
Let's take a look at some examples of how the CSS color property works.
In the example above, we used the color property to set the color of the text to red. You can use color names like red, blue, green, etc., or you can use hexadecimal values like #ff0000 for red.
In this example, we used the background-color property to set the background color of the div to green (#00ff00) and the color property to set the text color to black (#000000).
These are just a few examples of how you can use the CSS color property to style elements on your web page. Experiment with different colors and formats to create a visually appealing design.