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!

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 DOM Selection - More Review

Matt Gaboury
Matt Gaboury
Full Stack JavaScript Techdegree Student 1,540 Points

Is it supposed to be document.querySelectorAll?

I am confused on how this is supposed to look. Is it that or some form of document.querySelectorAll('student-info');

2 Answers

Raffael Dettling
Raffael Dettling
32,998 Points

You forgot the point "." in front of the student-info itยดs a class :)

28,554 Points

It is indeed a variation of document.querySelectorAll('student-info').

The querySelector and querySelectorAll method takes a CSS selector as their argument. In CSS you select classes by typing a period and then the name of the class. So to select the student-info class the code would look like this:


And that it the answer to the quiz. Knowing basic CSS selectors is quite handy even if you mainly do JS development since they are quite useful for selecting elements.