" symbol mean in css? Easy points are here for those who know. I am looking for a detailed answer to what it ( > ) means and how it...">

What does the ">" symbol mean in css?

Easy points are here for those who know. I am looking for a detailed answer to what it ( > ) means and how it should be used. Thanks.

+6
source share
3 answers

There is no valid < character in CSS. If you use it, you will invalidate your css.

However, you can use a > - child selector .

In CSS4, an object selector will appear. At the moment, it is marked with $ .

So

 $#parent a:hover{ /* styles */ } 

therefore, these rules will not apply to a in hoverstate, but it is parent with parent -ID. CSS4 specification

+4
source

< CSS is invalid, you should not use it anywhere in your CSS.

+4
source

Perhaps you are thinking of a selector > (great than a character).

This selector is known as the selector of child combinators.

This means that it will select only the direct children of the parent. For instance:

 ul > li 

So, for example, if you want to put a nested unordered list as such:

 <ul> <li></li> <li> <ul> </ul> </li> </ul> 

You would need to style it as such:

 ul > li > ul 

But this is only when using > , a selector of child combinators.

+1
source

Source: https://habr.com/ru/post/919592/


All Articles