What is CSS syntax ?



First question which are arise in mind for beginner is that what is syntax of css property? Now lets see just simple example to understand css syntax.

Code

body {
color: black;
font-style: italic;
}


There are three parts of syntax


(1) a selector (2) a property (3) a value

In above example selector is "body", a property is "color" and a valude is "black". This will help to understand about css property and its syntax.

 

USEFUL CSS PROPERTY

  • background
  • color
  • background-image
  • position
  • background-attachment
  • line-height
  • text-align
  • text-decoration
  • padding-top
  • padding
  • margin