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

  • border-spacing
  • border-left
  • border-right
  • border-bottom
  • border-top
  • text-align
  • color
  • float
  • font
  • visibility
  • position