Which fluid measurement type returns a percentage of the viewport height?

Prepare for the Web Development 201 Test. Utilize our flashcards and multiple choice questions with hints and explanations. Ensure you're ready for your web development exam!

The correct choice, which indicates a fluid measurement type that returns a percentage of the viewport height, is "vh." In CSS, "vh" stands for "viewport height," with 1vh equal to 1% of the height of the viewport. This means that if the viewport is 1000 pixels tall, 1vh would equal 10 pixels. By using "vh," you can create responsive designs that scale with the height of the browser window, allowing elements to adjust their size proportionally to the current height of the viewport.

In contrast, the other options serve different purposes. The percentage (%) unit is relative to its parent element rather than the viewport. The rem unit is based on the root element's font size, which allows for scalable font sizes but does not relate directly to the viewport dimensions. The vmax unit, while responsive, is based on the larger value of either the viewport's width or height, making it less specific compared to vh, which is exclusively based on height. Therefore, vh is specifically designed for scenarios where height-dependent responsiveness is needed.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy