HTML and CSS Units of Measurement

There are a variety of sizing units available in HTML and CSS. Each one has advantages and disadvantages.

The following relative size units can be used in most browsers.

The following absolute size units can be used in most browsers. These will NOT recommended as they will not resize based on device. Pixels are a special case.

Common Usage

In web design, we normally see pixels, percents, ems and rems. VW and VH are becoming more common. Pixels have long been the standard; however, this is not good practice for responsive design. The other measurement units are better.

More Information

Please see w3 schools for more details.