TechArena Community

TechArena Community (
-   Software Development (
-   -   use of CSS (

Sacchidananda 17-11-2009 02:12 PM

use of CSS
HI All,

I am learning web designing.I have studied the basic concept and I want to move to advance concept.

Can you help me to understand the CSS concept.

What is the CSS in html?
What is the general syntax for it? and can you explain it with suitable eaxmple?

opaper 17-11-2009 02:31 PM

Re: use of CSS
CSS stands for Cascading Style Sheets.

Cascading Style Sheet (CSS) is the collection of formatting styles which control the appearance of content in a web page. CSS is very useful in the updating and maintaining a web site. Because if you want to changes the style of entire content manually it will be time consuming,But if you use CSS then only we have to make changes in the particular CSS.

By using CSS you will have central control over fomatting of your web page using single file

You may save CSS styles directly in each document .

MindSpace 17-11-2009 02:42 PM

Re: use of CSS
According to my knowledge there total three types of CSS (Cascading Style Sheets)

1. Custom CSS styles: It is used to create a customized style along with the set attributes. You can apply this styles to any tag.

2. HTML Tag styles: It is used to redefine the formatting for a particular tag, for e.g <h3>.

3. Advanced CSS Selector styles:It is used redefine the formatting for a particular combination of tags and pseudo-class styles OR attribute with specific ID.

Modifier 17-11-2009 02:50 PM

Re: use of CSS
Following example will show you the general syntax for the Cascading Style Sheets:
HTML Code:

<style type="text/css">
.bluetext {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: #000066;text-decoration: none;} ->
Example of Class style:- apply using class property for any tag <p class="bluetext">

h1 {specifications} -> Example of Tag style:- for tag <h1>

a:link {specifications} -> Example of pseudo-class Advanced style:- applied to all <a> tags without any other style

#NewsBox {specifications} -> Example of ID attribute Advanced style:- applied to the tag whose ID property is set to NewsBox


Save this file with '.css' extension

Then If you want to apply this style to your html document use below code :

HTML Code:

<link rel="stylesheet" href="/styles.css" type="text/css">
This will definitely clear your doubts

All times are GMT +5.5. The time now is 11:26 PM.