Styla saysThe three core selectors: element (tag), class (.name), and id (#name).
Type selectors target every element of a kind (p). Class selectors (.btn) target any element wearing that class — reusable and the workhorse. Id selectors (#hero) target one unique element and carry high specificity. Reach for classes by default; use ids sparingly.
Power-ups you unlock
p → all <p> elements
.btn → any element with class="btn"
#hero → the one element with id="hero"
Classes are reusable; ids are unique
The Specificity Sphinx attacks — common mistakes
Styling with ids and fighting their high specificity later
Reusing an id (must be unique)
Naming classes by looks (.red) instead of purpose (.danger)
Boss battleStyle a tag, a class, and an id in one stylesheet and apply all three to a small page.