CSS color codes & names | color name
CSScolorcodesandnames.CSScolorThecolorcodecanbeoneof:Hexformat:#rrggbbRGBformat:rgb(red,green,blue)Nameformat:nameExampleFororangecolor:Hexformat:#FFA500RGBformat:rgb(255,165,0)Nameformat:orangeSettingelementcolorForspecificelement:
CSS color codes and names.
CSS colorThe color code can be one of:
Hex format: #rrggbb
RGB format: rgb(red, green, blue)
Name format: name
ExampleFor orange color:
Hex format: #FFA500
RGB format: rgb(255,165,0)
Name format: orange
Setting element colorFor specific element:
<element style="color: code;"></element>
For all elements of the same type. Put code in <style> tag in the head section:
<style> element { color: code; } </style>
ExampleSetting paragraph text color to red:
Setting color of specific paragraph:
<p style="color: #FF0000;">Some text ...</p>
View:
Some text ...
Setting color of all paragraphs
<style> p { color: #FF0000; } </style>
S...