This is Sasha and welcome to another CSS training video. Today, I want to show with you how you can add multiple selectors for your business website or if you’re trying to edit your business presence online. Let’s take a look at this.
Let’s take a look at this website and see how we can use multiple selectors, okay, or multiple rules. Here I have the heading tag or the H2 tag right there and you can see that since you have the H2 targeted it’s going to change both H2 tags just like this one and also this one right here at the top.
--------------------- HTML CODE --------------------------------------- CSS CODE ------------------ h2 { background-color: pink; font-size: 25px; }Backstageincome : Learn to grow a business and evolve your life! Welcome to My New Website!!!!!
Business Launch Pad is focused on showing you the critical concepts on how to build a profitable business from scratch.These are my books and products
Thank you for visiting

Using multiple selectors
Let’s say you also wanted to change the background of the paragraph tag. Well, what you could do is instead of writing, you know, the paragraph tag and then background color and then also typing in pink right here and then going ahead and saving it, you can see that does work, okay, in our paragraph tag. It does work but ultimately you have redundant code. It’s making things a lot longer.
--------------------- HTML CODE --------------------------------------- CSS CODE ------------------ h2 { background-color: pink; font-size: 25px; } p {background-color: pink;}Backstageincome : Learn to grow a business and evolve your life! Welcome to My New Website!!!!!
Business Launch Pad is focused on showing you the critical concepts on how to build a profitable business from scratch.These are my books and products
Thank you for visiting

Instead what you’d want to do is just go ahead and type in the P tag right there. You just add a comma and you go ahead and add in your P tag and you can see it works right there.
Let’s say, you wanted to go ahead and change the font size though of the P tag because now what you can see the problem here, what’s happening, is it also applies this font size and I actually have two semicolons there.
--------------------- HTML CODE --------------------------------------- CSS CODE ------------------ h2, p { background-color: pink; font-size: 25px; }Backstageincome : Learn to grow a business and evolve your life! Welcome to My New Website!!!!!
Business Launch Pad is focused on showing you the critical concepts on how to build a profitable business from scratch.These are my books and products
Thank you for visiting

Redefining values
But let’s say you didn’t want this font size to be 25 on the paragraph tag, okay? What you could actually do is redefine the paragraph and go font size, let’s say, 12 pixels right there, save that and you can see.
There we go. We went ahead and did 12 pixels. If I want it little bigger, I could do 18 pixels. But you can see the heading tag or the H2 tag, if I change it to 45, you can see the heading tag has not change whereas with the paragraph tag here a little bit later, it has been changed. If I want to redefine it again, I could go ahead and here, we’ll redefine it. I’ll just do background color, okay, and let’s just say yellow, I’ll go ahead and do that and because it’s later in the code, it reads it and it says, “Okay. Well, we’ll make that yellow.
--------------------- HTML CODE --------------------------------------- CSS CODE ------------------ h2, p { background-color: pink; font-size: 45px; } p { font-size: 15px; background-color: yellow; }Backstageincome : Learn to grow a business and evolve your life! Welcome to My New Website!!!!!
Business Launch Pad is focused on showing you the critical concepts on how to build a profitable business from scratch.These are my books and products
Thank you for visiting

Ultimately you have to be careful with that when you’re doing this or playing with this that when you’re combining multiple selectors that you only want to do it for tag such as – that are very similar so the heading tag and the P tag right there, I want them to be the same so I’ll be okay with the background color.
All of a sudden once you get into the font size, you may want to go ahead and do font size, let’s say, this one could be 30 pixels and then the paragraph tag might be font size, let’s say, 21 pixels. That way when you write your code out, it’s much more clean and neat. That way you have it right there.
--------------------- HTML CODE --------------------------------------- CSS CODE ------------------ h2, p { background-color: pink; } h2 {font-size:30px;} p {font-size: 17px;}Backstageincome : Learn to grow a business and evolve your life! Welcome to My New Website!!!!!
Business Launch Pad is focused on showing you the critical concepts on how to build a profitable business from scratch.These are my books and products
Thank you for visiting

Background is the same on all of them but the font size is different and if you go ahead and just change the font size to 17, you can see there the paragraph tag changes to 17, but that’s how you do multiple selectors. If I wanted to go ahead and do the same thing, let’s say, to the font size and I want the H2 font size 30. I want the same thing for these bullets which you can see the bullets is the UL tag.
I could go ahead and do the same thing and just type in UL right here and you can see it made it the same font size right there.
I just add a comma typically the practice is to add an extra space. You don’t have to do that but it works along the same way so whether you add a space or whether you don’t add a space but there you go. I added a space right there in between and you can see the links right here are also the same size right here.
--------------------- HTML CODE --------------------------------------- CSS CODE ------------------ h2, p { background-color: pink; } h2, ul {font-size:30px;} p {font-size: 17px;}Backstageincome : Learn to grow a business and evolve your life! Welcome to My New Website!!!!!
Business Launch Pad is focused on showing you the critical concepts on how to build a profitable business from scratch.These are my books and products
Thank you for visiting

Now granted they have the HTML property for the emphasis or italic and that’s a whole different story. That’s in the HTML. But as far as stylesheets goes you can see how you can really do multiple selectors or multiple rules for multiple attributes and selectors right there.