We are going to discuss about the pseudo classes. So, what are the super classes basically a pseudo class is used to define special state of an element. So, how for suppose and then to come in this way you can easily get the code. Now for suppose I have one, enter and I have incurred like this. Now I'm saying this is the home. Okay?
Now, I'm saying I have only one anchor. So that's why I'm going to create a element selector. I'm saying anchor. Go to the page, refresh the page. So this is the anchor. So by default, it's in this state.
I'm saying this is this. So this is the pseudo class. I'm saying that whenever Someone hover over this, I'm going to change the big long, big wrong way possible refresh the page. As you can see, it's changing the background. That means it's changing the state of a particular element. Okay?
You can also use multiple pseudo classes. For a single element for support, you're using the hover and now I'm saying that whenever someone so this is the active whenever someone active this element I'm saying background green. So go to the page, refresh the page. As you can see, when you hover over the anchor, it's changing the state Once you click and hold on, on the anchor, so as you can see it's changing the state. So, in this way you can use the pseudo classes, you can also use hover, you can also use the active you can also use the visited a lot of pseudo classes available here for suppose you can also define for suppose if you have a dip Okay, so I'm saying this is the old one, I have single label that's why I'm going to create the element selector. Now I'm saying that I have a div with the wrong read.
Now I'm saying the word is birth offered div is for suppose 200 pixels and the height offered there make sure you have to add the semicolon and the height of the day is also 400 pixels 200 Now we'll have the page refresh the page. So now as you can see, you have a single dip. Now I'm going to use the hall I'm saying I have a day whenever someone hover over the tip for supposedly This is the by default value. Now I'm saying I have a dare whenever someone power over their power, so this is a pseudo class, okay, now anything change who are supposed to go to the page refresh the page. Now, as you can see, it's changing, changing, changing. So you can define anything or you can also create for suppose if you have something like this, let me show you something.
I have a class. Okay, now inside the Dave, I have paragraphs Get out. I'm saying, This is my parent. And I have three parents here. And I have only single parents. Now, I want to say that I'm going to create a child selector.
So how I'm saying that P is an element. And now I'm saying, I'm just accessing the first child. And now I'm saying, This is the first. I'm trying. So I'm saying, find the first child of a paragraph, and color, that bad boy to read, or refresh the page. So now as you can see, you have the paragraphs.
For suppose if you don't have a day Can you have only the paragraphs for paragraphs. Now as you can see, it's selecting only the first child of a paragraph. From the on the document, you can also create the selectors or you can say that you have a P and in the P first child, you have your another element so it's totally dependent upon you. We have a lot of pseudo classes available in the CCS go around and explore some things. So thanks for watching.