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 4

Learn all kinds of things about altering fonts and text.


advertisement
Font Variant: {font-variant: normal/small-caps}
The font-variant property lets you select a small caps stye of your font. This property works hand-in-hand with the font-family property.

Example: If you wanted to specify the font Century Small Caps for the blockquote, you'd create two rules—one for font family and one for font variant:

blockquote {font-family:century serif; font-variant: small-caps}



If you have century small caps on your system, that's the face in which you'll see the example text.

Font Weight: {font-weight: normal/bold/bolder/lighter/XXX}
The font-weight property lets you select the darkness or lightness of your font. This property works hand-in-hand with the font-family property.

Example: If you wanted to specify the font helvetica or arial bold for the paragraph, you'd create two rules—one for font family and one for font weight:

p {font-family:helvetica, arial, sans-serif; font-weight: bold}

If you have helvetica or arial bold on your system, that's the face in which you'll see this example text.

You can also uses the font-weight property to specify relative boldness, with the values bolder or lighter. The browser darkens or lighten the boldness of the text based on the parent element.

Another variation on weight is using the numeric value 100, 200, 300, 400, 500, 600, 700, 800, or 900. A value of 400 is the equivalent to a medium or book-weight font. A value of 700 is the equivalent of a bold font.



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