Live data from Hacker News

HTML: font color=”red” becomes green

jsfiddle.net

81–90 of 99 posts

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

#85

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.

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

#88

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!

Green - with ascii quotes and an invisible seperator. http://jsfiddle.net/WGSNX/264/

Red text in source code

http://jsfiddle.net/A6TQK/

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

#89

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.

Correct. The HTML5 spec includes "unquoted attribute values," which have some special restrictions (no spaces, can't be the empty string, can't use HTML characters like >, http://www.w3.org/TR/html-markup/syntax.html#attr-value-unqu...
Post reply on HN