Question 6 of 10Pro Only
Explain the difference between px, em, rem, and percentage units in CSS. When would you use each one?
Sample answer preview
CSS offers different units for sizing, and choosing the right one depends on what you are trying to achieve. Let me explain each unit and when to use it. Pixels, written as px, are absolute units. One pixel is a fixed size that does not change based on context.
pixelsemrempercentagerelative unitsabsolute units