Why do certain random strings produce colors when entered as background colors in HTML?

For example, bgcolor="chucknorris" produces a red background:

Conversely, bgcolor="chucknorr" produces a yellow background:

This holds true across various browsers and platforms. What’s going on here?
It is caused by the way how your browser treats different color values. When you set the value of 'bgcolor' to the string 'chuck norris', it sets the RGB (red green blue) values for the corresponding CSS properties to ('123', '456', '789'). 

When the page is loaded, the browser tries to find all occurrences of this exact string in the downloaded HTML code. In case there are no matches found (because e.g. the string was moved or removed), the browser generates an error message like " Unknown property: chuck norris". But if there's at least one match - and most likely more than that because otherwise the style would not be applied at all - then everything seems to work as expected. It means that the browser believes that the RGB values defined by 'chuck norris' correspond to some actual color present on the screen and applies them accordingly.

So to fix this issue, simply change the spelling so that e.g. 'chuck Norris' becomes '-'. This way the browser will interpret the value literally instead of looking for any possible matches.