Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJay Bhatt
6,502 PointsHow do we define the universal selector?
I don't know the answer, isn't the universal selector some thing like body {} and header {}. I do not understand the question were its We define the universal selector by ______?
1 Answer
andren
28,558 PointsA body selector only selects elements within the body tag, the same is true for the header selector, the universal selector is a specific selector that matches literally all elements on the page, no matter where they are.
The universal selector is "*" (Asterisk), here is an example:
* {
margin: 10px;
}
That selector would add a 10px margin around every single element on the page, regardless of whether they are in the body, header or anywhere else on the page.
Jay Bhatt
6,502 PointsJay Bhatt
6,502 PointsAbsolutely! I completely blanked about the Universal Selector for a second, thank you for the answer