CSS allows you to specify font size, border size, margins, padding, etc. using many different units of measurement. The table below shows the units available:
The measurement unit most often used for designing web pages is pixels. A pixel is not an absolute measurement like, for example, an inch or a point. The actual size of a pixel depends on the resolution and size of a user's monitor. Consider an image that is 900 pixels wide. If the monitor resolution is set to 800 by 600 pixels, then the image will not fit on the screen. However, if the monitor resolution on the same computer is set to 1024 by 768 pixels, the image will fit with room to spare.
Points should be reserved for print. There are 72 points in an inch.
Although these are the most common units of measurement in life, they should be avoided in web design.
Picas should be reserved for print. There are 6 picas in an inch.
An em (or Mutt) is a relative unit that refers to the size of the letter "M" in a font. Because em is a relative rather than absolute measurement, it is often used in web design.
The "x-height" is the height of font's lowercase "x". Exs are used to set the size of content based on the size of the surrounding font.
A rem is a relative unit which is relative to the font-size of the root element (unlike the em, which is relative to the current element); rem is supported by all modern browser, in Internet Explorer from version 9.