Pages

Thursday 7 March 2013

CSS basics 1:Syntax

The first thing that anyone should know when learning CSS is that every line of code called a syntax. A syntax might look like this:
sector          Decloration                    Decloration
h1 {color:blue; font-size: 12xp;}
              property value                property         value
The syntax is made of two parts. One part is called a sector and the other part is called a decloration. A synax is made of one sector which is the id or class in this case h1, and one or more declorations whcih is the parts in side the unusuall brackets. Each decloration is made of a property and a value. The property is what you want to change, in this cas the colour and the font size, and the value is what you want to change it to, in this case blue and size 12. In the syntax colour is spelt color because CSS coding what crreated by World Wide Web Consortium based in America. It also doesn't matter what order the declorations go in.

No comments:

Post a Comment