Home HTML CSS JAVASCRIPT BOOTSTRAP Python Docker ML tutorial About us Privacy policy

Combinators in css


Combinators in css:-



this define relationships between selectors.

A CSS selector can connect to more than one simple selector. Between the simple selectors, we can be the include a combinators.

There are four ways combinators in CSS:-
  • descendant selector (space)
  • child selector (>)
  • adjacent sibling selector (+)
  • general sibling selector (~)
  • Descendant Selector:-

    The descendant selector is matches all the elements that are descendants of a defined element.

    Child Selector;-

    The is child selector selects all elements in the html and that are the children of a defined element.


    Adjacent Sibling Selector:-

    selects all elements in html and that are the adjacent siblings of a defined element.

    General Sibling Selector in css:-



    More Topics