Recall & Review
beginner
What are viewport units in CSS?
Viewport units are CSS units that represent a percentage of the browser's visible area. They help make designs responsive by sizing elements relative to the screen size.
Click to reveal answer
beginner
What does
1vw represent?1vw means 1% of the viewport's width. For example, if the browser width is 1000px, 1vw equals 10px.Click to reveal answer
beginner
Name the four main viewport units in CSS.
vw: 1% of viewport widthvh: 1% of viewport heightvmin: 1% of smaller viewport dimension (width or height)vmax: 1% of larger viewport dimension (width or height)
Click to reveal answer
beginner
Why use viewport units instead of fixed pixels?
Viewport units let elements resize automatically with the browser window. This makes your page look good on phones, tablets, and desktops without extra code.Click to reveal answer
intermediate
How does
vmin behave when viewport width is 800px and height is 600px?vmin uses the smaller viewport dimension. Here, height is smaller (600px), so 1vmin equals 6px (1% of 600px).Click to reveal answer
Which viewport unit represents 1% of the viewport height?
✗ Incorrect
vh stands for viewport height, so 1vh is 1% of the viewport height.If the viewport width is 1200px, what is the pixel value of 5vw?
✗ Incorrect
5vw means 5% of 1200px, which is 0.05 × 1200 = 60px.
Which viewport unit uses the larger dimension of width or height?
✗ Incorrect
vmax uses the larger of the viewport width or height.Why are viewport units useful in responsive design?
✗ Incorrect
Viewport units let elements resize automatically as the screen size changes, helping responsiveness.
What does 10vmin mean if viewport width is 900px and height is 700px?
✗ Incorrect
vmin uses the smaller dimension (700px), so 10vmin = 10% of 700px = 70px.Explain what viewport units are and list their four types.
Think about how viewport units relate to screen size percentages.
You got /5 concepts.
Describe a situation where using viewport units improves a website's design.
Imagine viewing a website on a phone versus a desktop.
You got /3 concepts.