Hello everyone and welcome back.
In the previous video we learned about the descendants selected and jailed selected in today's video.
We will learn about a distant sibling and generally sibling coordinators and CSI this post.
Let's try it dozens have been selected.
The syntax to use a distant sibling selector is selected a plus selected B.
This plus sign is that a distant sibling selector.
This age in sibling selector will select the first sibling which is matching the selected the.
Let's try one example to understand it better
say you have these extremist elements and you want to select the paragraph which is right next to the
div.
So let's bring about good editor here all right.
So coming to the states via.
So right now we are talking about a defensive link selector.
So a discern sibling selected to so what we want to do is you want to select all the paragraphs which
are next to theirs so div practices of links active use plus plus and we want to select all the paragraphs.
So let's see.
Let's try to highlight all these paragraphs.
So let's say background colour on light blue let's save it on coming back here.
So you can see in the first article we have one paragraph selected which is the food line and the second
article we have one paragraph highlighted which is the third one.
So let's check our could come into this achievement page on for the first article.
We have a div
uninspired then we have two paragraphs.
So this this paragraph is the food live.
And if you check here.
So I thought that was highlighted similarly for the second article.
We've got Dave here on one paragraph often cited and one before it.
So this paragraph is a total one so let's come down here and as you can see tote bag office highlighted.
So that's how you select ages and siblings on if you're wondering what a sibling is to simply other
elements which have the same bearing element and they come after the target element.
So in our case these are the agency siblings.
So this third paragraph I'm the fourth paragraph with respect to this similarly that say you want to
select all the paragraphs which come after the h three or you want to select all the 86 siblings of
it's three.
Let's try it out as well.
So coming down here let's come in this.
So what we want to do here is we want to select all the paragraphs which are a sense of being too extreme.
So let's write it's three then a decent sibling selector and we have to select all the paragraphs let's
go to background color.
See Light Blue.
Let's save it.
Come back here.
So as you can see the first paragraph as I laid it I know what you wrote in the first paragraph is highlighted.
Let's check out a student code so after it's through the first paragraph.
I guess this first one.
Similarly for the first article of the HRC the first paragraph time is this one.
Similarly if this paragraph was allowed in a div
now this first paragraph wouldn't be the A.G. sensibly because the period for this start ruffles def
and not article that's all for a distance it looks like two guys now moving on to the next one which
is general certainly selector so the syntax to use general see being selector is selected eight do the
select to be this do the sign is there general something selected the General Assembly selector list
select all list of links matching the selector B let's try an example to understand it better.
So coming back here let's come in this one
so right now we're trying general sibling
selector
let's bring a book with it to the here let's save it now let's say we want to select all the paragraphs
which are similar to the give.
So let's try that.
So def on do the unwanted select all the paragraphs.
So let's give it about Don't say like do let's say the
now as you can see the third floor.
So the fourth fifth and sixth there is highlighted and over here we've got the second and fourth fifth
highlighted.
Let's check our good.
So coming up here so in the first article after they're dead we have one two three these three paragraphs.
So over here also these three paragraphs highlighted
for the second one you've got like give and after they're dead we have one and two paragraphs which
are 2D and food after that both of these paragraphs are dropped and then give.
So as you can see the third and fourth is highlighted and that's all for today guys.
If there's something that you did not understand feel free to go a comment and we will discuss it.
See you in the next video.
Bye.
And get.