CSS combinator explains relationship between selectors - HTML

Q.  A CSS combinator is the one which explains the relationship between the selectors.
- Published on 19 Oct 15

a. True
b. False

ANSWER: True
 

    Discussion

  • Nirja Shah   -Posted on 05 Nov 15
    - A combinator is something that explains the relationship between the selectors.

    - More than one simple selector can be contained in a CSS selector. A combinator can be included between the simple selectors.

    - There are four different combinators in CSS3:
    1. descendant selector - This selector matches all elements that are descendants of a specified element.

    2. child selector - This selector selects all elements that are the immediate children of a specified element.

    3. adjacent sibling selector - It selects all elements that are the adjacent siblings of a specified element.
    Sibling elements must have the same parent element, and "adjacent" means "immediately following".

    4. general sibling selector - It selects all elements that are siblings of a specified element.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)