What is CSS ?



CSS stands for Cascading Style Sheets. Css is one of the important factor in designing website page. Now all web developer give importance to this css property while designing website. Css plays a role about how web site page will display. CSS includes many of property which can effect to website page. The page extention of css page where css styleet sheet are stored is .css. It becomes very easy to change layout of website if web developer use this style sheet. CSS includes propery which effect differently to browser to browser. That means all property may not work in all browser.

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.

How CSS stylesheet can be inserted in web page ?


Now lets see that how css stylesheet can be inserted in web page. There are two method to insert css stylesheet into webpage

(1) External css and (2) Internal css

Example of External css method

<link rel="stylesheet" type="text/css" href="style.css" />
Here CSS is created separately with extention .css and that file is called as above. This css method will decrease main file size where this css file is called. So this method is widely used. For SEO (Search Engine Optimization) view this method is best.

Example of Internal css method

<head> <style type="text/css"> h1 {color: sienna} body {color: #FFFFFF;} </style> </head>
Here you can see that CSS is not created separately, but css property code is inserted directly in to the file in between tag <html> and </html>. This method is used when we want to give effect only into one file. But however if you want to get more benefit of css property then it is better to use external method.

 

USEFUL CSS PROPERTY

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