Sail E0 Webinar

MCQs

Total Questions : 10
Question 1. Which of the following CSS list properties is/are correct?
  1.    Set different list item markers for ordered lists
  2.    Set different list item markers for unordered lists
  3.    Set an image as the list item marker
  4.    All of the above
 Discuss Question
Answer: Option D. -> All of the above




Question 2. Which of the following selectors selects direct descendents?
  1.    E > F
  2.    E F
  3.    E + F
  4.    E ~ F
 Discuss Question
Answer: Option A. -> E > F


Example:
body > p {background-color: yellow;}
/* makes all p tags that have the
body tag as their immediate parent
have the background color yellow */


Question 3. Find the specificity of this "ul ol li.red.
  1.    specificity = 0,0,3,1
  2.    specificity = 0,0,1,3
  3.    specificity = 1,1,1,1
  4.    specificity = 1,2,2,1
 Discuss Question
Answer: Option B. -> specificity = 0,0,1,3




Question 4. Which of the following selectors selects any tag with an id attribute set?
  1.    E#id
  2.    .class
  3.    #id
  4.    *
 Discuss Question
Answer: Option C. -> #id


Example:#test {color: green;}
/* makes a tag with id='test' green */


Question 5. A ___________ is used to define a special state of an element.
  1.    pseudo-tag
  2.    pseudo-element
  3.    pseudo-id
  4.    pseudo-class
 Discuss Question
Answer: Option D. -> pseudo-class




Question 6. Find the specificity of this "ul ol li.red.
  1.    specificity = 0,0,1,3
  2.    specificity = 0,0,0,4
  3.    specificity = 0,1,2,1
  4.    specificity = 1,1,1,1
 Discuss Question
Answer: Option A. -> specificity = 0,0,1,3




Question 7. Which of the following selector selects the element that is the first child of its parent that is of its type?
  1.    :first-of-type
  2.    :last-child
  3.    ::first-line
  4.    ::first-letter
 Discuss Question
Answer: Option A. -> :first-of-type


Example: strong:first-of-type {font-size:bigger;}


Question 8. Which of the following is the correct way to apply Styles?
  1.    inside an HTML element
  2.    inside the section of an HTML page
  3.    in an external CSS file
  4.    all of the above
 Discuss Question
Answer: Option D. -> all of the above




Question 9. Find the specificity of this "ul ol+li.
  1.    specificity = 0,0,2,1
  2.    specificity = 0,2,1,1
  3.    specificity = 0,1,1,1
  4.    specificity = 0,0,0,3
 Discuss Question
Answer: Option D. -> specificity = 0,0,0,3




Question 10. Which of the following selector selects elements that do not match the selector s?
  1.    :!(s)
  2.    :nth-child(s)
  3.    :not(s)
  4.    none of the above
 Discuss Question
Answer: Option C. -> :not(s)


Example: *:not(h1) {color: black;}


Latest Videos

Latest Test Papers