+ 1
When shoul i use # and when i should not?
hello, may I ask you a question? i have read that html colors should alxayd start with # is it true? is there any color that doent follow this rule? thanks for your answer previously.
4 Answers
+ 6
# is only used and required for hexadecimal notation of colors... as you have several notations available for colors in Css:
<< The <color> CSS data type represents a color in the sRGB color space. A color can be described in any of the following ways:
- using a keyword
- using the RGB cubic-coordinate system (via the #-hexadecimal or the rgb() and rgba() functional notations)
- using the HSL cylindrical-coordinate system (via the hsl() and hsla() functional notations) >>
source: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
0
I don't think it matters. I wouldn't suggest using color names, as they aren't as accurate, but otherwise, they are the same. The only time you couldn't use hexadecimal (#) or rgb is when you want transparent colors (rgba).
0
thank you so much
0
thanks