Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,997 Points

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

28,520 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.