background-color opacity css - Why does HTML think “chucknorris” is a color?

css background color code / html / browser / background-color

How come certain random strings produce colors when entered as background colors in HTML? For example:

<body bgcolor="chucknorris"> test </body>

Igor Burago

Answer #1

Note, this does not apply to CSS color parsing, which follow the CSS standard.

<p><font color='chucknorris'>Redish</font></p>
<p><font color='#c00000'>Same as above</font></p>
<p><span style="color: chucknorris">Black</span></p>