Selectors: Tag, Class, ID: Coding lesson for kids

In this lesson, children learn to write a CSS rule that targets an element, class, or id.

p { color: red; }: A TAG selector — styles every <p> on the page.

.highlight { color: red; }: A CLASS selector (the dot) — styles anything with class="highlight".

#title { color: red; }: An ID selector (the hash) — styles the ONE element with id="title".

This lesson is part of HTML/CSS in Coding at Pearls Valley Academy — Build and style your first web page.

Each lesson starts with a short narrated, animated explanation, then hands-on practice. A wrong answer gets a gentle hint, never a penalty, and children earn stars and pearls as they go.