Selectors Flashcards
When we group selectors, what happens if we place a comma after the last selector?
The entire rule gets ignored by the browser
Y/N: Is the space between two selectors in a descendant selector considered a combinator?
Yes
What combinator is used by a child selector?
>
The adjacent sibling selector uses a _____ as its combinator
+
What selector uses the tilde (~) as its combinator?
General sibling selector
What are 3 combinators used in selectors?
> , +, ~
The :link pseudo-class will only target anchor elements that have what attribute?
href
The _____ pseudo-class targets an element once it has obtained focus.
:focus
What pseudo-class targets an element that is being activated by the user?
:active
What pseudo-class is used to inform the user that a link has already been clicked?
:visited
The _____ pseudo-class allows us to style links that have not yet been visited.
:link
li:nth-child(1) {}
Selects the li that is the first child of the ul
li:nth-last-child(1) {}
Targets the li that is the last child of the ul
:first-child
:last-child
:only-child
- targets the first, last child
- represents any element which is the only child of its parent