Hacker News new | ask | show | jobs
by hill79 4696 days ago
I never remember that . = class and # = id in CSS, so I use "say no to drugs" to remember that "hash is not class".

Perhaps a mnemonic which only really works in the North East of the UK where 'class' is colloquial slang for 'good'. Also not very good if you smoke pot, I guess.

4 comments

I also took it to mean that it's not classy to smoke hash (i.e. 'you stay classy, San Diego' :D)
I remember the difference between class and id by thinking someone is trying to "Pound an idea into your head" or rather "# an id"
Just remember that a hashtag points to something specific. A dot means nothing, so that's the least specific/most generic thing
Strange one. FYI, "class" has the same meaning in French slang -- probably borrowed from you guys.
I think it's the other way around. I think you guys use _class_ as slang to _classy_: "pertaining to or characteristic of a (high) class," which comes from the literal sense of class, which comes from the French word _classer_.

I didn't know for sure, but I had that feeling knowing that most of the English language is borrowed from others, and not the other way around. (http://www.etymonline.com/index.php?allowed_in_frame=0&searc...)