6 ms·
Why does HTML think “chucknorris” is a color? (2011)
- hayksaakian 13y agoWaning: 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?
- hkmurakami 13y agoThe post is a year old, but received a lot of views/tags/upvotes so a stackoverflow "top threads" reader might be reading these in his or her downtime.
- amavisca 13y agoIt was just posted on reddit for the 100th time (r/webdev)
- ygra 13y agoAs for me, I often explore related questions if their title is interesting. I also follow a few people who post very good answers because they're usually a joy to read. And sometimes I stumble over things I didn't yet know and find interesting. I posted one such case here once. But that's just me.
- DanBC 13y ago4. Manage to avoid the HN dupe checker.
- deleted 13y ago[deleted]
- yuhong 13y agoNoticed I added references to Netscape classic source code.
- biot 13y agoAs Seen on HN™ https://www.hnsearch.com/search#request/submissions&q=chucknorris https://www.hnsearch.com/search#request/submissions&q=chuckn...
- picomancer 13y ago> 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 13y agoSurely "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.
- nostrademons 13y ago<center> is deprecated in HTML5. Unfortunately teaching him about margin: 0 auto and text-align: center might be a bit more complicated.
- wubbfindel 13y agoSounds like that was the least of his HTML problems. Probably wasn't using CSS at all of he was using tables for layout.
- tragomaskhalos 13y agoLet he who has not used table-based layout cast the first stone ...
- zerr 13y agoWho would argue otherwise?
- tobyjsullivan 13y agoThis 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 13y agoDon'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 13y agoSo, you are saying this is a gray area? (somebody had to say it)
- dhughes 13y agoTo me "gray" just seems wrong, grey feels right.
- toupeira 13y agoYep, Firefox supported both spellings while IE displayed green for 'grey'.
- minikites 13y agoI've heard it described as, "gray is a color, grey is a colour"
- chris_wot 13y agoI thought it was because Chuck Norris doesn't adhere to web standards - web standards adhere to him!
- ftwinnovations 13y agoThank you! This was the only reason I clicked into the comments, and you delivered well.
- aaron695 13y agoPlease 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.
- oneeyedpigeon 13y agopresumably against the teaching of evolution in schools ... (good point, though - he's pretty much an anti-gay, gun-toting dick)
- hnriot 13y agoI 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.
- mrknmc 13y agoSimilar to the Nancy bug: http://calculist.blogspot.co.uk/2006/02/nancy-typing.html http://calculist.blogspot.co.uk/2006/02/nancy-typing.html
- beat 13y agoOf course Chuck Norris is a color. He just has more bits than other colors.