Complete the code to set the font size to 2 times the root element's font size.
p { font-size: 2[1]; }px which is absolute, not relative.em with rem.The rem unit means "root em" and scales relative to the root font size.
Complete the code to set the margin to 5% of the parent element's width.
div { margin: [1]; }px which is fixed size.rem which relates to root font size, not parent width.The % unit sets size relative to the parent element's width for margin.
Fix the error in the code to set padding relative to the current element's font size.
section { padding: 1[1]; }px which is fixed size.rem which relates to root, not current element.The em unit scales relative to the current element's font size, perfect for padding.
Fill both blanks to set the width to 50% of the viewport width and height to 10% of the viewport height.
div { width: 50[1]; height: 10[2]; }% which relates to parent, not viewport.em which relates to font size.vw means viewport width and vh means viewport height, both relative to the browser window size.
Fill all three blanks to create a responsive font size: 1.5 times the root font size, with a margin of 2% and padding of 1em.
p { font-size: 1.5[1]; margin: 2[2]; padding: 1[3]; }px for font size or margin which is not responsive.em and rem units.This sets font size relative to root (rem), margin as a percent of parent width (%), and padding relative to current font size (em).