From the course: Practical CSS for No-Coders
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Grouping selectors
From the course: Practical CSS for No-Coders
Grouping selectors
- [Instructor] Sometimes you'll have multiple types of selectors that you'd like to style the same way. Let's say that we'd like the paragraphs on this page to be green. You already know how to write that, so pause the video and write that style now. (funky music) (electronic music) So hopefully you did this. P, color green. Awesome. Our paragraphs are green. Now, let's say that you also want the list items to be green. How would you write a style for those? Pause the video again, take a look at that HTML, and think about how you would make your list items green. Well, in all likelihood, you would do something like this, li, color green. That's great code. You've done a great job. That's exactly the right kind of answer. However, what would happen if we had a dozen other elements and classes that we wanted to be green as well? That is a lot of copy and paste over and over again to make that happen. So one of the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.