Thursday, 28 November 2013

CSS: Syntax

CSS: Syntax

CSS has two main parts: a selector, and one or more declarations:

The selector is the HTML element you want to style, and each declaration contains a property and a value. The property is the style attribute you want to change. Each property has a value.
For completely knowledge You have to know how to use class and id.


p { color: orange; font-size: 20px;}
h1 {color: red; font-size: 30px; text-align: center;}

<p>This is simple paragraph</p>
<h1>This is simple heading</h1>


» Result:

This is simple paragraph

This is simple heading

No comments:

Post a Comment