color
Anonymous contributors
Anonymous contributors
Anonymous contributors
Published Jul 7, 2021Updated Sep 3, 2021
Contribute to Docs
To set color property values for an element.
Syntax
color: <value>;
The <value>
can be the following:
- Name of the color (e.g.,
aqua
,khaki
,red
) - RGB colors (e.g.,
rgb(249, 2, 171)
) - Hexadecimal Colors (e.g.,
#ff0000
)
Example 1
Set the h1
tag to be red color:
h1 {color: red;}
All contributors
- Anonymous contributorsAnonymous contributors
- Anonymous contributors
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.