
Why does HTML think “chucknorris” is a color? (2011) - Techasura
https://stackoverflow.com/questions/8318911/why-does-html-think-chucknorris-is-a-color
======
tobyjsullivan
This definitely corrects a misconception I've had for years.

When I first started writing HTML, I would set colours using the english
colour names, for example color="red" or color="white" and this worked well
for my needs.

However, I would always get an odd result when I tried to set the colour grey.
Turns out, I didn't spell very well (I was pretty young at the time, though
still spell atrociously).

<font color="gray">

And the colour would come out green. What?

I quickly realised my spelling error but wondered why things ended up green. I
decided what was happening was that the interpreter read the colour name up
until the first invalid character (in this case resulting in "gr"), then chose
the closest match. Green would be before grey in alphabetical order and...
voila!

I see now the solution was simply that gray was interpreted as 00 a0 00.
Another life mystery solved!

~~~
oneeyedpigeon
Don't beat yourself up about it: 'gray' is a perfectly legitimate US-English
variant of the British-English 'grey'. In fact, 'Gray' is actually correct
according to the spec (I had to look it up, and remember making this very
mistake in the old days, which makes sense given that I'm British) I have a
vague recollection that the 'misspelling' was actually handled differently
between browsers.

~~~
Amadou
So, you are saying this is a gray area?

 _(somebody had to say it)_

------
picomancer
> HTML is built around intentionally ignoring malformed input

To elaborate: In the very early days, HTML was often written by hand. Part of
the early vision of the web was that anybody could write HTML and publish
content.

It was thought that allowing malformed HTML to result in a completely blank
page or an error message would be too unfriendly for less technical users.

In those early pre-CSS pre-JavaScript days, HTML was more like bbcode,
Markdown, or RST today. It's interesting that AFAIK those languages don't have
a notion of malformed input -- there is no movement to tighten the bolts on
Markdown in the way that XHTML attempted to tighten the bolts on HTML.

~~~
sillysaurus2
Surely "ye olden HTML days" aren't _that_ far back that we should be talking
about them in past tense?

I just had a conversation with an iPhone repair guy. He asked me to help him
fix a centering problem in his website. So he pulled up the HTML, and it was
just _awful_. Table-based layout, broken tags... But it worked, and I taught
him about the <center> tag. He gave me a discount on my repair.

Malformed HTML input is still very much alive and well, and necessary for non-
technical people.

~~~
tragomaskhalos
Let he who has not used table-based layout cast the first stone ...

~~~
eksith
Table based layouts (still being used on practically every forum I frequent)
weren't so bad until mobile came into the picture. With fixed sizes, they just
weren't flexible. Plus the added bandwidth of sending hundreds of <td>s were
non-trivial for those of us who were on a shoestring budget and had sudden
influx of visitors back in the day.

Of course, now we've replaced the hundreds of <td> with hundreds of JS files
instead. Problem solved!

~~~
runn1ng
If I remember correctly, in IE6, the table didn't load until all of the
elements loaded. That's how they tought us tables were baaad.

~~~
eksith
Indeed, you _do_ remember correctly. This was especially fun on dialup.

But it was OK because the forum was running phpBB, which would invariably be
hacked/spammed, so you'd be getting a free dialer which was guaranteed
increase download speeds ;)

------
biot
As Seen on HN™
[https://www.hnsearch.com/search#request/submissions&q=chuckn...](https://www.hnsearch.com/search#request/submissions&q=chucknorris)

------
chris_wot
I thought it was because Chuck Norris doesn't adhere to web standards - web
standards adhere to _him_!

~~~
ftwinnovations
Thank you! This was the only reason I clicked into the comments, and you
delivered well.

------
aaron695
Please remember Chuck Norris is a fundamentalist christian who doesn't like
gays and is against evolution in schools.

If that's your belief system no problem.

If not perhaps rethink just how cool he and this whole meme is.

~~~
hnriot
I have always thought the meme was really saying the total opposite, by saying
how cool he is was really making fun of him for the reasons you state.

------
hayksaakian
Waning: Meta

What's the process by which a stack overflow question hits HN?

How does the OP

1\. Wander into this question

2\. Decide it's worth sharing

3\. Decide to post on HN specifically?

~~~
amavisca
It was just posted on reddit for the 100th time (r/webdev)

------
mrknmc
Similar to the Nancy bug: [http://calculist.blogspot.co.uk/2006/02/nancy-
typing.html](http://calculist.blogspot.co.uk/2006/02/nancy-typing.html)

------
yuhong
Noticed I added references to Netscape classic source code.

------
beat
Of course Chuck Norris is a color. He just has more bits than other colors.

------
zerr
Who would argue otherwise?

