Live data from Hacker News

HTML: font color=”red” becomes green

jsfiddle.net

91–99 of 99 posts

Re: HTML: font color=”red” becomes green

#92
post #70
post #68

Earlier quoted context omitted.

Me too. I thought "can't be that, too easy", so I looked for another mistake.

I'd like to ask everyone saying "I saw the quotes right away," what OS do you use? Perhaps your OS uses a different font. I've had bugs in websites where menus would be completely messed up because they didn't fit in their given space, just because the font of choice was not available on Linux and it fell back on something slightly larger. Edit: Though in the HN title it is much clearer than in the jsfiddle, for me a…

I'm using Chrome on OSX and the color value was highlighted red in the source, so I immediately looked at that.

Re: HTML: font color=”red” becomes green

#93

Wow. I haven't seen a tag in years. My thought processes loading this: • Ok, that is in fact green. • I wonder if this is related to the colour name parsing weirdness that was on HN a couple of weeks ago? • Heeeey, those aren't ASCII quotes!

Had exactly the same Heeeey moment :)

Re: HTML: font color=”red” becomes green

#94
post #70
post #68

Earlier quoted context omitted.

Me too. I thought "can't be that, too easy", so I looked for another mistake.

I'd like to ask everyone saying "I saw the quotes right away," what OS do you use? Perhaps your OS uses a different font. I've had bugs in websites where menus would be completely messed up because they didn't fit in their given space, just because the font of choice was not available on Linux and it fell back on something slightly larger. Edit: Though in the HN title it is much clearer than in the jsfiddle, for me a…

Chrome on Windows and Linux, on HN and jsFiddle, the quotes were very obvious to me.

Re: HTML: font color=”red” becomes green

#95
the reason it didn't work is you were not using ASCI values. HTML even though it supports multi-byte strings, the constructs which power the html spec do not support multi-byte strings. Also smart-quotes are note part of that spec and will be interpreted incorrectly. replace smart-quotes with normal quotes will make it work correctly.

Re: HTML: font color=”red” becomes green

#97

http://www.whatwg.org/specs/web-apps/current-work/multipage/... = ”red” = 0red0 (" is not ascii so make 0) = 00ed0 (r is not hex so make 0) = 00ed00 (pad)

What's the point of having different quotation marks that are not ascii? Sounds like a formatting nightmare.

Re: HTML: font color=”red” becomes green

#98
post #97

http://www.whatwg.org/specs/web-apps/current-work/multipage/... = ”red” = 0red0 (" is not ascii so make 0) = 00ed0 (r is not hex so make 0) = 00ed00 (pad)

What's the point of having different quotation marks that are not ascii? Sounds like a formatting nightmare.

Typography, duh.

Re: HTML: font color=”red” becomes green

#99

1) Curly quotes are not a valid surrounding for values. 2) will usually be interpreted as a value by browsers, even though it's illegal, because everything on the web is wrong 3) The browser sees curly quotes as part of baz 4) For lord only knows what reason, the most basic interpretation of that curly quote appears to be the color green. That'll be somewhere in the CSS spec. I don't care to look it up. If you change…

I believe that HTML 5 allows for unquoted values. As long as the attribute doors not contain HTML special characters or spaces, it's legal to omit them.

Yes, and that's the mechanism by which HTML gets confused and thinks that the curly quotes, which are not recognized as value bracketting, are part of the value.
Post reply on HN