Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

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!

3 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 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 11,077 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.

Thanks for the help. I'm using school metaphor to remember this in the future. In middle school, we used to call our classroom's Period. So for CLASS I related it to PERIOD. I like the hashtag reference from Dane, thanks for the tip.