+ 2
Why doesn't it make a difference when you don't put a # when doing hex codes?
Or at least it didn't for me!
8 ответов
+ 8
The only right way to write an hexadecimal color code in Html/Css is to prepend the value with the '#'...
Because of Html ( and browsers ) permissivity, you can have the lucky that the browser correct your code, but you cannot be sure that will be the case with any other browser, or during time in future ^^
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
+ 2
No, but that's because I was trying to make it black but instead of doing 000000 I accidentally did 777777, making it grey which I kept because it looks better.
+ 1
So 'cause what I was writing wasn't a number?
+ 1
# is an identifier. At one time it probably made a difference for html, but it doesn't seem to anymore
+ 1
So it really doesn't matter whether you use it or not?
+ 1
Are you getting the color output you desire? Personally I use it, but that's out of habit. makes it easier to skim your code and find it
+ 1
if your interested, I made a color picker for pc in Java and another for android. I use them for my hex and rgb numbers all the time. it's here on the site I made to throw my projects http://leakyegg.website.tk/
- 1
<HTML><body><p>title<p></body></HTML>