Understanding measurement units

In many cases, when you enter a number as the value of an attribute or property—for example, font size—you are given the choice of what unit to use. The units you can use in Namo WebEditor are described below.

Namo Web Editor icon note Understanding measurement unitsIt is usually not necessary to specify a unit, even when the choice is given. If you do not specify a unit, the default unit will be used. The default unit depends on the property or attribute being modified, but most often it is pixels.

Common length units

These units are used in cascading style sheet (CSS) properties that take a length value, such as margins and borders. For more information, please refer to CSS Value Types in the online CSS reference.

Unit

Abbr.

Meaning

inches

in

inches

points

pt

1/72 of an inch

picas

pc

12 points

cm

cm

centimeters

mm

mm

millimeters

pixels

px

pixels (units of screen resolution)

em

em

a unit equal to the current font size

ex

ex

a unit equal to the “x-height” of the current font

%

%

percentage of base value*

*The base value for a % value depends on the property being modified. For font sizes, the base value is the calculated font size of the parent element.

Special font size values

These unitless values are used only for font sizes.

Unit

Notes

1~7

Size on a scale from 1 (smallest) to 7 (largest). The exact size corresponding to each number depends on the browser, but “3″ usually corresponds to 12pt.

xx-small
x-small
small
medium
large
x-large
xx-large

The exact size corresponding to each keyword depends on the browser.

smaller
larger

Sets the font size one “step” smaller or larger than the font size of the parent element. The size of each step depends on the browser.

Understanding measurement units