Tsallaka zuwa abun ciki
Justice Tech School

Element Selectors and Selector Lists

An element selector targets all tags of a type. Separate selectors with commas to share one rule. This keeps CSS short.

Example
<style>
h1, h2, h3 { color: #5eead4 } p { color: #fbbf24 }
</style>
<h1>One</h1><h2>Two</h2><p>Paragraph</p>

Exercise

Separate selectors with a ___

h1 h2 { color: red }

Quiz Test

What does a comma between selectors do?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.