Describe the following common CSS units of length: cm, em, in, mm, pc, pt, and px.

Experience Level: Junior
Tags: CSS

Answer

  • cm - centimeters
  • em - font size of the element
  • in - inches is 2,54 cm
  • mm - milimeters
  • pc - pica: A pica is a hair less than 1/6 inch, and contains 12 points. Picas are typically used to represent fixed horizontal measurements, most often column width.
  • pt - point: Points are the measurement most commonly used in print to indicate the size of type, as well as the space between lines.
  • px - pixels

Comments

No Comments Yet.
Be the first to tell us what you think.