|
em |
em is equal to the computed font-size of that element’s parent. For example, If there is a div element defined with font-size: 16px then for that div and for its children 1em = 16px. |
|---|---|
|
rem |
rem values are relative to the root html element, not to the parent element. That is, If font-size of the root element is 16px then 1 rem = 16px for all elements. |
|
px |
pixels are the easiest measurement to use. pixels may be good at spacing and layout but are not good fit for font-size |
|
% (percentage) |
percentage is relative to parent’s: width, height, margin, padding, and font-size |