• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

9.6. font Property

This is a “shortcut” property that allows the Web author to quickly set fonts in the manner possible under the font-family, font-size, font-style, font-variant and font-weight CSS properties. Interestingly enough, it also allows you to set line-height as well. Also, note by their absence the inability to add values belonging to the font-stretch and font-size-adjust properties introduced under CSS2 — this is deliberate, as the designers of CSS wanted the font property to be backwards compatible.

For the most part, though, you can do anything with the font value that you can do with any of the other font family properties. If you are planning on using a number of font family properties in your code, you may find this simple but versatile CSS property useful to make all the font settings you want.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint