QAds
Nokia N8 Touchscreen Phone Siyah - gps navigation, Voice Navigation, 12 MP Camera
$449.99
Apple iPod shuffle 4 GB Siyah
$49.13
Nokia N8 Touchscreen Phone Siyah - gps navigation, Voice Navigation, 12 MP Camera
$449.99
Toshiba Satellite T115D-S1125 LED TruBrite Laptop
$360.00
:: HOME CSS Understanding CSS
 
Understanding CSS

CSS (Cascading Style Sheets) helps users about how to display HTML elements. When you develop a WEB page by HTML, you always face with style="" attribute for every HTML tag. With the help of the CSS you can design more complex WEB pages and also you save time and work.

 

For example, you need to define face, color and size for every text in your document, otherwise it uses default values. Instead of that you can define default face, color and size for text in your document. Also use can define your own elements in document.

 

To be able to do that CSS use IDs and class names which must be unique. An ID name is used to define an individual element on a document. Classes are used to define any number of elements in a document.  They are very useful for similar items in a document. Moreover, you should use meaningful names and don’t forget that CSS is case-sensitive.

 

We use .CSS type for CSS files and add them into HTML like this:

 

<link href="main.CSS" rel="stylesheet" type="text/CSS" />

 

Also we can define CSS in our document like:

 

<style type="text/CSS">

</style>

 

Moreover we can import any CSS file in our CSS files:

 

@import url("/CSS/style.CSS");

 

 

In CSS file, we define id by using # and for class We just use .(DOT)

 

.classname {

 

}

 

#IDName {

 

}

 

We can use these class names and IDs in HTML elements with class="" and id="" attributes or we can define our own elements by using <div> and <span> tags.

 

<p class="MainParag">…</p>

<div class="MainParag">…</div>

 

<div> is used to define division in a document. <span> is used to define a group or inline element.