This course will be retired on July 12, 2021. We recommend "CSS Basics" for up-to-date content.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
Selectors are one of the most important and powerful parts of CSS because they let us target the content we want to style. When we define a selector in our stylesheet, we’re instructing the browser to match every instance of that selector in the HTML.
Quick Reference
Universal Selector
The universal selector targets every element on the page at once and applies the styles we set.
* {
margin: 0;
padding: 0;
}
This universal selector will apply the margin and padding styles to every element on the page.
You need to sign up for Treehouse in order to download course files.
Sign up