CSS: final assessment

This covers the whole course. Take it after the last module.

Final quiz

1. Which declaration is written correctly?
2. Why are classes preferred to ids for styling?
3. What does input[type="email"] select?
4. Rules A and B have the same specificity, and B comes later. Which wins?
5. Which is not inherited by default?
6. Which is an equivalent of 3rem, if the root font size is 10px?
7. Which rule stops an image from overflowing its parent?
8. A span ignores width: 200px. Why?
9. Which element becomes a flex item in <div style="display:flex"><p><a>x</a></p></div>?
10. How do you push one flex item to the far right of a row?
11. Why can fr be better than percentages for grid columns?
12. A grid-template-areas value contains an L-shaped area. What happens?
13. What creates a stacking context?
14. Which selector styles a form that contains an invalid input?
15. What must a mobile-first page contain for a phone to use its real width?
16. A hover transition runs when the pointer arrives, but snaps back when it leaves. What is wrong?

Practical assessment: Rescue a broken stylesheet

Write a small card component from scratch, with a title, image, text and a button, and arrange three of them in a row that wraps on narrow screens, meeting every point below without using any hints.

Final project

A responsive landing page: Take a small, plain HTML page for a product of your choice, and style it into a complete landing page that works on a phone and on a large screen.

How it is evaluated

To complete this course