From the course: CSS: Selectors

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

*, the universal selector

*, the universal selector - CSS Tutorial

From the course: CSS: Selectors

Start my 1-month free trial

*, the universal selector

- [Instructor] Finally, neither a pseudo class nor a pseudo element, we have the universal selector. It's designated by a star. And as that star suggests, it's going to select everything matching a certain criteria. So, one of the things that I have done through the years is I've often set up the body tag here with some default styling for the document. Like a font family or a font size, those kinds of things. One of the things you might be tempted to do immediately is to change your body tag to the star selector. And boom, absolutely nothing changes here in the way this webpage looks. It has simply selected everything in the document and applied those font families. So what would be the difference between using the body tag and using the star tag? Well the problem is, you're using the wrong declaration here for testing the star value. So the difference is, in the case of the body tag, everything is inheriting that font family. But in the case of the star, you are explicitly declaring…

Contents