Sizing
5.8
Lesson

Absolute Units

When we use absolute units to specify a length, the size is fixed and does not depend on the size of other elements.

Some absolute units are:

  • Pixels, px
  • Centimeters, cm
  • Inches, in


Look at the code given below:

The size of these elements do not change when you change their font size or parent element’s size.