CSS Selector Flashcards

1
Q

Figure the HTML elements that are selected by these:

  1. ul
  2. li
  3. .myClass
  4. # myID
A
  1. Unordered List
  2. List Item
  3. Class myClass
  4. Id myID
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Figure the HTML elements that are selected by these relational selectors and combinators:

  1. ul li
  2. ol li
  3. ol > li
  4. li.hasaclass + li
  5. li.hasaclass ~ li
A
  1. List items that are nested in an unordered list
  2. List items that are nested in an ordered list
  3. li that are child of ol
  4. li that is only after the li with class hasaclass
  5. all li that are after li.hasaclass
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

E[attribute^=value]

A

find any element, which attribute starts with value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly