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

Chapter 7. CSS Optimization > Use Shorthand Properties

Use Shorthand Properties

Shorthand properties allow you to specify the values of several properties with a single property. They combine multiple property definitions into a shorter, more abbreviated form. In most cases, any omitted values are assigned an initial value automatically. Combined with grouping, shorthand properties let you shrink your styles to the bare minimum. There are six types of shorthand properties defined in CSS: font, background, margin, border, padding, and list.

The font Shorthand Property

The font property allows you to set all font-related properties with one abbreviated property. The syntax is based on traditional typographic shorthand notation. The syntax is font followed by values separated by spaces, in the following order:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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