Welcome Guest! (App Version 3.1)

websitnero logo name

Relational Selectors

Relational Selectors in CSS

Relational selectors are those selectors which bear resemblence in relationship just like humans. These selectors constitute Descendant Selector, Direct Child Selector, Sibling Selector and Next Sibling Selector.

Relation Selectors
S.No.NameRepresentationDescriptionExamples
1Descendant SelectorE PSelects all the descendants of an element
2Direct Child SelectorE > PSelects all the descendants which are direct childs of an element
3Sibling SelectorE ~ PSelects all same level siblings of an element after it (not those siblings which are before the element in dom)
4Next Sibling SelectorE + PSelects the first (or next) sibling after an element at the same hierarchy level
WebsiteNero is highly optimized for learning various website developing technlogies. We try our best to add maximum modules and examples to help learn the concepts clearly and vividly. We try to present all content and examples as simple as we can removing any complexity to hurdle easy understanding. We try best provide you with worthful content, but we cannot guarantee full correctness of all the content on this site. While using this website, you agree to have read and accepted all our terms of use and conditions, cookie, and privacy policy. Copyright, 2013-2018 by websitenero.com. All Rights Reserved.