HTML interpretation of Quotation mark: `"` vs `”`
html
Solution
The character ” (U+201D RIGHT DOUBLE QUOTATION MARK) is very different from the character " (U+0022 QUOTATION MARK). The latter is defined to act as attribute value delimiter in HTML; the former has no special significance in HTML, it is just yet another data character.
Thus, the attribute value specified is `”red”`´, with the right double quotation marks included, a total of five characters. It is of course an invalid color value. The error recovery that browsers apply, and that is being standardized in HTML5, see HTML5 CR, clause 2.4.6 Colors, is that any character that is not a hexadecimal digit is replaced by the digit 0, and then if the length of the string is not a multiple of three, 0 digits are appended to make it so. So first the browser converts `”red”` to `00ed0`, then appends `0` to get `00ed00`, a green color. This is then treated as if it were prefixed by `#`.
If you use e.g. the developer tools (F12) in Chrome to inspect the element, you will see that the styles for the `font` element have `color: rgb(0, 237, 0);`, which is an alternative notation for `#00ed00`. In Firefox, using Firebug, you will see it as `#00ED00`.
Problem
Can someone explain what's going on for this code to produce green text: ``` <font color=”red”>Red, anyone?</font> ``` http://jsfiddle.net/WGSNX/7/. I assume it's something to do with the first `”` symbol, but why should HTML parse that differently to `"`?