HTML & CSS · Junior · Question 24 of 75
What is 50vw equal to?
- 150% of the parent element's width
- ✓Correct answer: 50% of the viewport width
- 350 pixels on any screen
Explanation
vw is 1% of the viewport width, vh is 1% of its height. Percentages (%) depend on the parent. Caveat: 100vw includes the vertical scrollbar width and may cause horizontal scrolling, and on mobile 100vh ignores the collapsing browser toolbar - that's what dvh is for.