CSS styles dictate to the browser how to display the specific element. The styles are called properties. Examples of properties would be font-size, background, width, height, etc.

Every CSS property has certain features that can be modified. CSS properties apply to certain elements and not to others. The properties have a default value.

When displayed on this site, CSS Basics, the property will be broken down in the following manner:

property-name

  • value: the possible legal values and their syntax There will often be a value within <> brackets meaning that you need to suppy this particular information.
    initial value: the initial value or default value of the property if nothing else is specified
  • inherited: if the property in inherited
  • percentages: how percentages are applied to this property
  • applicable to: elements to which this property is applied

Examples of property definitions:

color

  • value: <color> | inherit
    initial value: depends on user agent
  • inherited: yes
  • percentages: N/A
  • applicable to: all elements

What the above information means is that the initial value set for color depends on the user agent or browser settings. <color> means that you must specify which color you wish to have the element. Color is inherited meaning that the child elements will inherit the color of the parent element. Percentages do not apply to the color property. The color property can be used with any element.

box-shadow

  • value: none | <shadow> [,<shadow>]*
  • initial value: none
  • inherited: no
  • percentages: N/A
  • applicable to: all elements

What the above information means is that the the initial or default value is none, this means that their will be no box-shadow unless specified in the styles. <shadow> means that you need to give the specifications for the amount and direction of the shadow. It is not an inherited property, meaning that if the parent element has a box-shadow, the child element will not have a box-shadow unless specified. Percentages have no bearing on this property. Applicable to: means that a box-shadow can be applied to any element.