advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Partners & Affiliates
advertisement
advertisement
 

CSS: Fonts and Text

Learn all kinds of things about altering fonts and text. 

Text Values

Absolute: pt/pc/cm/mm/in
Relative: px/em/ex/%

ou can measure most font and text properties in either absolute or relative units. The tables below show the values and their options.

Absolute Units

unit abbreviation example
points pt font-size: 12pt
There are 72 points to an inch, 12 points to a pica.
picas pc text-indent: 2pc
There are 12 picas to an inch.
centimeters cm text-indent: 4cm
inches in text-indent: 1in
millimeters mm text-indent: 8cm

Relative Units

unit abbreviation example
pixels px text-indent: 30px
A pixel is one picture element on the display monitor; there are typically between 72 and 90 pixels/inch.
em space em text-indent: 4em
An em space is the width and height of the capital letter M in the current font size and design.
x space ex line-height: 3ex
An ex space is height of the body of the current font size and design, about the height of the lowercase letter x.
percentage of
parent's value
XX% font-size: 90%
  Next Page: Font Size
Page 1: IntroductionPage 5: Line Height
Page 2: Font SizePage 6: Text Indent and Alignment
Page 3: Font Family and StylePage 7: Text Decoration and Transformation
Page 4: Font Variant and WeightPage 8: Letter and Word Spacing
DevX is a division of Jupitermedia Corporation
© Copyright 2007 Jupitermedia Corporation. All Rights Reserved. Legal Notices
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs