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

CSS CSS Basics (2014) Basic Selectors Basic Selectors Review

i am stuck here guys .. an element can only have ---------- id and page can have ----------- element with the same id ?

please help this question is not letting me pass the quiz ..

4 Answers

answer for both blanks are 'one '

rydavim
rydavim
18,814 Points

It's the same answer (1) for each bit. IDs are used to select and identify a particular element, so you can't have more than one.

Christopher McNeese
Christopher McNeese
1,146 Points

I put (1) in the blank and was told every time that it was incorrect. What gives?

rydavim
rydavim
18,814 Points

You don't need the parentheses, if you included them it'll likely mark it incorrect.

Jaime Rios
PLUS
Jaime Rios
Courses Plus Student 21,100 Points

The logic is that you might use an ID once in your document, for whatever element you want to add it.

If you want to use the same ID on another element, you should use a class instead. Classes can be repeated, IDs can't.

do you know the exact answer :) ? please tell me

Josh Ellis
Josh Ellis
3,972 Points

Hi Awais,

I haven't seen the video, but this question looks like it's asking about the number of id's that can be applied to a single element and the number of times the same id can be used per page. Id's are unique (the same id cannot be used more than once on a page) and element can only have a single id.

Hope this helps.

Thanks