CSS Tutorials

Intorduction
CSS stands for Cascading Style Sheet, this is a language to simpligy website design and develpment. With CSS, you can control the color of text, the style of fonts, the spacing between paragraphs, how columns are sized and laid out, what back ground images or colors are used, as well as a variety of other visual effects.

CSS was created in language that is easy to learn and understand, but it provides powerful control over the presentation of a document. Most commonly, CSS is combined with the markup languages HTML or XHTML.

CSS Rules

As you dissect a style sheet, it can be broken down into progressively smaller bits. From large to small, it goes like this

  • Style Sheet
  • Rule
  • Selector
  • Declaration
  • Property
  • Value

In between, some special characters are used to mark the beginning and ending of one bit from another.

CSS style defined like:
body {
	margin:0;
	padding:0;
	font:12px sans-serif;
} 
and we can control body section with css.

SELECTORS

In CSS, a Selector is the HTML element or elements to which a CSS rule is applied. Put simply, the selector tells the browser what to format. The simple selector that you saw in the last section body which is a selector which is start with "{" and end with "}" body is written in the style sheet without the left and right angle brackets,. for more information click here

Declarations

Declarations are enclosed within curly braces to separate them from electors. A declaration is the combination of a CSS property and value.

Declarations are enclosed within curly braces to separate them from electors
body {
	margin:0;
	padding:0;
	font:12px sans-serif;
    background:#00 url ('images/backgrounds/star.phg') no-repeat fixed;
} 

A declaration is a complete instruction for styling a property of an HTML element. A declaration is the combination of a property and value. Each declaration ends with a semi-colon.