Which CSS unit is relative to viewport width?
Correct answer
A. vw
15 views
A. vw
15 views
vw (viewport width) is relative to the width of the browser viewport: 1vw equals 1% of it, so 50vw is always half the screen width. Its partner vh does the same for height.
em is relative to the element's font size, rem to the root font size, and % to the parent element. Viewport units are central to responsive design.
Keep preparing with more Computer Science MCQs on MCQsExam.com.
Not sure why the answer is A? Ask here and get an explanation.