TalentJR apps
A selector chooses which elements a rule styles. An element selector such as p picks every paragraph. A class selector starts with a dot and picks every element with that class — many elements can share a class. An id selector starts with a hash and picks the one element with that id — an id is used only once on a page.
✓ You passed this lesson’s test.
Dot for class, hash for id — “a plain name picks a tag, a dot picks a class, a hash picks an id”
Use it for: Styling just one part of a page, like a menu, a warning box or a big title.
Check: #main → id="main" ✓ (a .main would need class="main")
▶ Watch it animatedWork it out in your head or on paper, type the answer and press Check. Stuck? Press “Show me how”.
Right: 0 · Tried: 0
20 questions. Check each answer, then go to the next one. Get 16 or more right to pass.
🏅 Sign in with Google to earn the 🎯 Selector Sharpshooter badge when you pass — and a certificate when you finish all 10 lessons of Part 2 · CSS. You can still take the test without signing in.
Why does it work? When should you use it? Ask in English, मराठी or हिंदी.
Sign in with Google to ask Free — 20 questions a day.
Prefer a real teacher? TalentJR teachers take live online classes anywhere in India and visit homes in selected cities. Tell us what you need and our team will call you with timings and fees.