186k views
5 votes
Which fluid measurement type returns a percentage of the viewport width?

a) px
b) vw
c) vh
d) em

User Joanne
by
7.7k points

1 Answer

4 votes

Final Answer:

The fluid measurement type that returns a percentage of the viewport width is vw (Option B).

Step-by-step explanation:

In web design, fluid measurements are used to create responsive layouts. Among the options provided:

px (pixels) is an absolute unit.

em is relative to the font-size of its closest parent or the element itself.

vh (viewport height) is a percentage of the viewport height.

The correct option is vw (viewport width), which returns a percentage of the viewport width. For example, if an element is set to width: 50vw, it will be 50% of the viewport width, adjusting dynamically as the viewport size changes.

Option B is the answer.

User Nils Schmidt
by
8.4k points