Complete the code to set the width of the box to 50% of the viewport width.
div {
width: 50[1];
}vh which relates to viewport height, not width.px which do not scale with viewport.The vw unit means 1% of the viewport width. So 50vw is half the viewport width.
Complete the code to set the height of the header to 10% of the viewport height.
header {
height: 10[1];
}vw which relates to width, not height.pt which do not scale with viewport.The vh unit means 1% of the viewport height. So 10vh is 10% of the browser window height.
Fix the error in the code to make the box height 100% of viewport height.
.box {
height: 100[1];
}% which depends on parent height.px which do not scale.Using vh sets height relative to viewport height. % would be relative to parent, which may not fill viewport.
Fill both blanks to set the font size to 5% of viewport width and margin to 2% of viewport height.
p {
font-size: 5[1];
margin: 2[2];
}vw and vh units.px which do not scale.vw is used for font size relative to viewport width, and vh for margin relative to viewport height.
Fill all three blanks to create a responsive square box with width and height 30% of viewport width and padding 1% of viewport height.
.square {
width: 30[1];
height: 30[2];
padding: 1[3];
}vh for width or height which can distort the square.px which do not scale.Width and height use vw to keep the box square relative to viewport width. Padding uses vh for vertical spacing.