Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

CSS: Fonts and Text : Page 2

Learn all kinds of things about altering fonts and text.


advertisement
Font Size: {font-size: XXunits/%/sizevalue}
The font-size property lets you specify the size of the element's text. You can specify text as:

  • An absolute unit size, measured in points, millimeters, centimeters, or inches.

    Example: This sets a style rule making paragraphs be 18 point text:



    p {font-size: 18pt}

    If you are using a CSS-enabled browser, this paragraph appears in 18 point text.

  • An "absolute" text size, using the "absolute" text values. These values are: xx-small, x-small, small, medium, large, x-large, xx-large.

    Example: This sets a style rule making paragraphs be x-small in size:

    P {font-size: x-small}

    If you are using a CSS-enabled browser, this paragraph appears in x-small size.

  • A relative unit size, measured in pixels or percent. (You can also measure it in ems or exs, but these units don't really make sense for measuring font-size.)

    Example: This sets a style rule making paragraphs be 120% of the parent paragraph text size:

    P {font-size: 120%}

    If you are using a CSS-enabled browser, this paragraph appears 120% of the paragraph's usual point size.

  • A relative unit size, measured as "smaller" or "larger" than the current size.

    Example: This sets an inline style making the paragraph "larger" in size than the current style:

    <P style="font-size: larger";>

    If you are using a CSS-enabled browser, this paragraph appears "larger" than the paragraph's usual point size.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date