Hi, and welcome to this Dream River tutorial. My name is Daniel Walter Scott, and I'm a trainer here at Bring Your Own Laptop. In this tutorial, we're just gonna look at refining our skills at creating a class. 'cause they're quite important. We use classes quite a bit. Um, so let's create our second class.
Now we're gonna do it to one of the words in here. Um, we are going to pick our word legendary, okay? And we are going to make it a different size. Actually, we'll change a different color and we'll make it italics. Let's say that it's the brand name. So let's pick a brand name.
Actually, let's go for combi. Okay, VW Combi. I want to make italic and change the color of it. So to do it, what I need to do is just like we did before, I don't have to highlight it first, it's up to you. Um, but I can click main CSS, that's where I'm gonna put this class. I'm going to create a new selector that I get to name, remember I can call anything I like.
So I'm gonna call it, um, the main, the main thing to make sure it's a class is it has to have full stop in the front of it. Then once you put that, I'm gonna have this as, um, this is gonna be my CNAME for my company name. You get to name it anything you like. No spaces, no special characters. And down here I'm in the properties panel. I'm gonna choose text and I'm gonna go through and decide it's going to be a different color.
Okay? I'm gonna make this one green and I'm gonna pay with a font style and I'm gonna make it italic. Alright? Nothing happens over here until I apply it. So it's got the paragraph tag already applied or already applied. This one, I'm gonna apply my class and you can see here C name.
Let's have a look at in code view. So you can look at it in CSS. So this is my, um, class set I created called C name. And it's got a color of green and a font style of italic. But you can also look in source code. This is my HTM l this is the H TM L part of it.
So this is the CS S part. This is the html. This is my index HTML page. You'll see if I zoom in in here. Um, actually I won't zoom in. I've got, um, where is he?
So there's my paragraph starts. So my paragraph starts there and closes there. That gives me my paragraph. Now within this paragraph, I highlighted the word combi and it's wrapped this thing called a span tag around. And in this, okay, the span tag, it's called a span class. And there's my little C name.
So this is how it goes off my H tm L now goes off looking for a class called C name M my CSS, and then applies these features to it. So that's how a class works. Alright, that's it for this tutorial. Um, I'll see you in the next one.