Friday, January 25, 2013

CSS: Defining a Style

CSS syntax is made up of the following entities:
  1. Selector (the element or tag you wish to control)
  2. Property
  3. Value

Example:
Below I am going to show an example in order to illustrate the style better.

body{
padding: 10px;
}

body - Selector
padding - Property
10px - Value

Always place a semicolon at the end of a property.

Hope you have got a better idea of the entities involved in CSS style.

 

No comments:

Post a Comment