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 Interacting with the DOM Responding to Events Common DOM Interaction Errors

Daniel Rose
Daniel Rose
4,848 Points

The naming of ID/Class names

Why would all the HTML IDs and Class names be camelCase in the course examples? I thought the convention for naming these HTML attributes is to use lowercase, and if multi-word, separate the words using the hyphen character. A little confusing for a newbie like myself.

1 Answer

Travis Alstrand
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Travis Alstrand
Treehouse Teacher

Hey Daniel Rose ! :wave:

I just downloaded the project files for this Interacting with the DOM course to take a second look and I'm not sure that I'm seeing what you're seeing.

In the index.html file provided I see all the class names are hyphen-separated input-main, btn-toggle, list-container etc. The variables created in the JavaScript are camelCase which is to be expected. I may be missing something though, can you let me know exactly the course / video you're on and seeing this? Thanks!

Daniel Rose
Daniel Rose
4,848 Points

Hey Travis, thanks for taking the time to look. I've double-checked myself and was sure I was seeing the issue in the instruction part of the course, but I was wrong.