C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Definitions » General »

CSS - Cascading Style Sheets


Posted Date: 16 Oct 2009    Resource Type: Definitions    Category: General
Author: laxmiMember Level: Silver    
Rating: 1 out of 5Points: 5



CSS

CSS stands for Cascading Style Sheets. CSS is used to refine the refine the presentation of a web page. CSS allows us to set the properties for HTML elements using a large collection of values. It has more than 100 properties, and is an advanced tool for web designers to create professional web sites that cannot be made using regular HTML attributes.

A style sheet is a set of rules. To define a rule, a selector and a declaration is used.
The selector is used to choose which elements would use the settings defined by the declaration.

A declaration has the syntax:

property_name : property_value

where the property_name is a reserved word that defines a property and the property_value is a valid value for that property.

Examples :-

font-size : 14pt; used to set the size of the text to 14 pt
font-style : italic; used to set the style of the text to italic style
cursor : move; used to set the mouse pointer to the move style
text-decoration : none; used to eliminate any decoration of the text

Declaration Blocks :-

A declaration block is a list of declarations separated by semi-colons (;) and included in a { ….. } block. Here are some examples of declaration blocks:

{font-size : 12pt; font-style : italic;}
{background : yellow;}
{text-decoration : none; cursor : move;}

The Type Selector :-

To define a rule, a selector is used, followed by a declaration block.
For example, the following code defines a rule for rendering all

elements using a 12 pt, italic font. Hence it applies to any

element.

p {font-size : 12pt; font-style : italic;}


Style Sheets :-

Many rules can be added to define a style sheet. For example, the following fragment represents a style sheet:

p {font-size : 12pt; text-transform : uppercase;}
h3 {font-style : italic; background : yellow;}
div {color : red; font-size : 10pt;}
img {cursor : move;}


Attachments

  • CSS - Cascading Style Sheets (34102-161154-CSS.doc)
  • CSS - Cascading Style Sheets (34102-161155-CSS.doc)


  • Responses


    No responses found. Be the first to respond and make money from revenue sharing program.

    Feedbacks      
    Popular Tags   What are tags ?   Search Tags  
    Sign In to add tags.
    CSS  .  Cascading Style Sheets  .  

    Post Feedback


    This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
    You must Sign In to post a response.
    Next Resource: About Web Service Enhancement
    Previous Resource: What is a Lambda expression?
    Return to Discussion Resource Index
    Post New Resource
    Category: General


    Post resources and earn money!
     
    More Resources



    dotNet Slackers

    About Us    Contact Us    Privacy Policy    Terms Of Use