CSS Complete Course: final quiz

Twelve questions covering the whole CSS Complete Course.

  • Beginner
  • 12 questions

12 questions. Pass mark 70%.

  1. Question 1 of 12 Which is the standard way to add a site-wide stylesheet to every page?
  2. Question 2 of 12 This HTML is styled by the CSS below: <p class="intro" id="lead">Hello</p>. What colour is the paragraph?
    CSS
    #lead { color: red; }
    .intro { color: green; }
    p.intro { color: blue; }
  3. Question 3 of 12 Which of these properties are inherited by default?

    Select all that apply.

  4. Question 4 of 12 With the default box-sizing, what is the visible width of this box?
    CSS
    .box {
        width: 200px;
        padding: 10px;
        border: 5px solid;
        margin: 20px;
    }
  5. Question 5 of 12 Why is rem usually preferred over em for font sizes?
  6. Question 6 of 12 Which declaration on a flex container centres its items horizontally when flex-direction is row?
  7. Question 7 of 12 What does flex: 1 expand to?
  8. Question 8 of 12 Which grid definition creates as many columns of at least 15rem as fit, sharing extra space equally?
  9. Question 9 of 12 A dropdown has z-index: 9999 but still appears behind the next section. Which are likely causes?

    Select all that apply.

  10. Question 10 of 12 What is the specificity of :where(#main .nav) a?
  11. Question 11 of 12 Which colour does a link inside #nav get?
    CSS
    @layer base, components;
    
    @layer components {
        a { color: green; }
    }
    
    @layer base {
        #nav a { color: red; }
    }
  12. Question 12 of 12 Which properties can usually be animated without triggering layout or paint?

    Select all that apply.