JavaScript JavaScript and the DOM Getting a Handle on the DOM Using CSS Queries to Select Page Elements

David Soto
David Soto
2,002 Points

What can we do to remember that "." is for classes, and "#" is for ID's? is there some kind of acronym or saying?

What helps you identify between the two? What I have come up with, Classes are related to school and Periods (".") are related to school as well. Thanks!

2 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 60,927 Points

Other than Dave's answer the only other thing I can recommend is practice and repetition. Over time, it will stick in your memory! :-)

Dane Parchment
MOD
Dane Parchment
Treehouse Moderator 7,159 Points

To be honest, I have never heard of any time of saying or acronyms for this.

I guess one way you can remember at least the # is using the concept of twitter hashtags, where you can have only unique hashtags. But other than that, this is just one of those things you need to memorize, and to be quite honest, it is very simple to remember, you just have to use them more often so that it gets ingrained into your memory.

Also, can I ask why you are asking this as a JavaScript question? This is mainly for CSS and unless you are using querySelector isn't really applicable to javascript.