Home / CSE MCQs / CSS MCQs :: CSS Selectors & Files

CSE MCQs :: CSS MCQs

  1. Which of the following CSS list properties is/are correct?
  2. A.
    Set different list item markers for ordered lists
    B.
    Set different list item markers for unordered lists
    C.
    Set an image as the list item marker
    D.
    All of the above

  3. A ___________ is used to define a special state of an element.
  4. A.
    pseudo-tag
    B.
    pseudo-element
    C.
    pseudo-id
    D.
    pseudo-class

  5. Which of the following selectors selects any tag with an id attribute set?
  6. A.
    E#id
    B.
    .class
    C.
    #id
    D.
    *

  7. Which of the following selectors selects direct descendents?
  8. A.
    E > F
    B.
    E F
    C.
    E + F
    D.
    E ~ F

  9. Find the specificity of this "ul ol li.red.
  10. A.
    specificity = 0,0,3,1
    B.
    specificity = 0,0,1,3
    C.
    specificity = 1,1,1,1
    D.
    specificity = 1,2,2,1

  11. Find the specificity of this "ul ol li.red.
  12. A.
    specificity = 0,0,1,3
    B.
    specificity = 0,0,0,4
    C.
    specificity = 0,1,2,1
    D.
    specificity = 1,1,1,1

  13. Which of the following selector selects the element that is the first child of its parent that is of its type?
  14. A.
    :first-of-type
    B.
    :last-child
    C.
    ::first-line
    D.
    ::first-letter

  15. Which of the following selector selects elements that do not match the selector s?
  16. A.
    :!(s)
    B.
    :nth-child(s)
    C.
    :not(s)
    D.
    none of the above

  17. Which of the following is the correct way to apply Styles?
  18. A.
    inside an HTML element
    B.
    inside the section of an HTML page
    C.
    in an external CSS file
    D.
    all of the above

  19. Find the specificity of this "ul ol+li.
  20. A.
    specificity = 0,0,2,1
    B.
    specificity = 0,2,1,1
    C.
    specificity = 0,1,1,1
    D.
    specificity = 0,0,0,3