/

HTML / CSS / JavaScript Tutorial

CSS Shorthand Properties

[this page | pdf | back links]

Some of the CSS properties are shorthand properties that combine several related properties, e.g.:

 

Shorthand rule:

E.g. div {border: border-width border-style border-color;}

Is equivalent to

div {

  border-width: border-width;

  border-style: border-style;

  border-color: border-color;

}

Further comments

Shorthand properties can typically also take the value initial or inherit

 

Shorthand properties include:

 

-          animation

-          background

-          border

-          border-bottom

-          border-image

-          border-left

-          border-right

-          border-top

-          column-rule

-          columns

-          flex

-          flex-flow

-          font

-          grid

-          list-style

-          margin

-          outline

-          padding

-          transition

 


NAVIGATION LINKS
Contents | Prev | Next | CSS Properties


Desktop view | Switch to Mobile