Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14

Chapter 3 quiz

10 questions · instant feedback after each answer.

1.

What does CSS stand for?

Correct answer: B. CSS = Cascading Style Sheets. It describes the presentation of HTML: layout, colours, fonts and spacing.
2.

Which is the correct syntax for a CSS rule?

Correct answer: A. A rule is a selector followed by a declaration block: property:value pairs separated by semicolons inside { }.
3.

Which selector has the highest specificity (excluding !important and inline styles)?

Correct answer: C. Specificity order is: inline > ID > class/pseudo-class > element. So the ID selector wins among these.
4.

Which level of style sheet has the highest cascade priority?

Correct answer: C. Inline styles (the style attribute) have the highest priority, then embedded, then external, then browser defaults.
5.

Which unit is relative to the root element font size?

Correct answer: C. rem is relative to the root font size; em is relative to the parent element font size.
6.

Which box-sizing value includes padding and border inside the declared width?

Correct answer: B. border-box includes padding and border in the width, so the total size stays predictable. It is the 2025 best practice.
7.

Which display value creates a two-dimensional layout system?

Correct answer: C. Grid is the two-dimensional system (rows and columns). Flexbox is one-dimensional.
8.

Which pseudo-class styles a link while the mouse is over it?

Correct answer: C. :hover matches when the pointer is over the element. :active is only while it is being clicked.
9.

Which animation-timing-function is essential for sprite-sheet animation?

Correct answer: C. steps(n) creates discrete jumps between frames — exactly what a sprite sheet needs (e.g. steps(6) for 6 frames).
10.

Which 2025 CSS feature lets you style a parent based on its children?

Correct answer: A. :has() is the long-awaited parent selector, now baseline in all browsers, e.g. div:has(img) { }.