Building a website with HTML (Hypertext Markup Language) is only half the story. HTML controls the structure of a web page, using tags such as <p> for paragraphs, <img> for images, adn <input> for form elements. This structural role has become even more important with the introduction of semantic elements, such as <article> and <nav>, in HTML5. But HTML says nothing about how the page should look.

CSS (Cascading Style Sheets) allows you to create rules that specify how the content of an element should appear. For Example, you can specify that the background of the page is cream, all paragraphs should appear in gray using the Arial typeface, or that all level on heading should be in a blue, italic, Times typeface.

Creating a style rule is simple. There a different parts that make up a style rule.

Lets take a look at each part in turn:

1. Selector: This tells the browser where you want to apply the rule use a type selector (sometimes called a tag selector), which redefines the default styles of an HTML tag,

2. Declaration block: This begins with a left curly brace and ends with a right curly braces. you put your style declarations b/w these braces. Each declaration consists of a property followed by a colon: (:) and a value, and end with a semicolon (;).

3. Property: This is one of the properties defined in the CSS specification. Most have intuitive names. The property affects the left margins of the element being styled.

4.Value: This is the value you want to apply to the property. Some properties have a fixed list of values that you can choose from Others let you specify the value yourself.