Absolute Units : measurement « Style Basics « HTML / CSS
HTML / CSS
Unit Full Name
pt A point
in An inch
cm A centimeter
pc A pica
mm A millimeter
Related examples in the same category
Testing 96 DPI Equals an Inch
This paragraph has a 200 pixel width and 10 pixels of padding
Relative units giving rise to unequal side margins
em is relative to the font size
Relative size font-size: .75em
width: size an element by assigning pixels, ems, a percentage, or another fixed measurement to width.
Percentages are more flexible because they can scale to the viewport.
width:100% stretches an element to the width of its parent.
Units of Length and Percentage
Absolute vs. Relative Measurements
one inch tall
font-size with various measurements
This font is 24 pixels tall and this div is 3 ems tall
The body's border is 1em thick
inch vs pixel
percentage measurement width
A negative margin
This paragraph has a 1 pixel thick, solid black border around it.
Comparing em to Pixels
This font is 1.2 smaller than the default size, or pixels.
inch measurement 2
inch vs pixels
Em Measurement Comparison to Pixels
12 pixel base
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.