Fire Studios

Archive

Contact

Categories

  • Coding
    • CSS
    • HTML/Javascript
    • PHP
  • Design
  • Freebies
  • General
  • Internet
  • Interviews
  • Plugins
  • Podcasts
  • Reviews
  • Screencasts
  • Tutorial
  • Weekday Tips
  • Wordpress

Podcast

Weekday Tip: CSS Shorthand pt.3

Weekday Tip: CSS Shorthand pt.3

Font

The font property is, with exception of some system fonts, a shorthand property for setting all of the properties for a font in one declaration. These declarations go in order of font-style, font-variant, font-weight, font-size/line-height, font-family. Below is a chart showing values can be used in each section.

p {font: [style] [variant] [weight] [size]/[line-height] [family], [family];}
  • Font-style:
    • Normal – default
    • Italic
    • Oblique
  • Font-variant:
    • Normal – default
    • Small-caps
  • Font-Weight:
    • Normal - default
    • Bold
    • Bolder
    • Lighter
    • 100
    • 200
    • 300
    • 400
    • 500
    • 600
    • 700
    • 800
  • 900
  • Font-size / Line-height:
    • xx-small
    • x-small
    • small
    • medium
    • large
    • x-large
    • xx-large
    • smaller
    • larger
    • #px/ em/ pt - default
    • %
  • Font-family:
    • "font name" (Verdana, Tahoma, Georgia, etc…)
    • generic-name (sans-serif, serif)

    Reader's Thoughts

    • Richard

      Many thanks, just what I'm looking for!

    • Andy

      I definitely need to work on this. Thanks!

    Your Thoughts?

     

    This is that small text that tells you not to steal our stuff, but we don't really care too much.