Saturday, 16 February 2013

Introduction to CSS


Cascading style sheet (CSS) is a language used to describe the presentation criteria of mark up language documents. CSS is recent addition to html.


CSS are the  way of controlling the way the browser displays the page. the most common function of CSS is to style the web pages written in Htm land Xhtml. It consists the basic rules which tells the browser how to represent the document. primarily CSS was designed to separate the document content from document presentation using  layouts ,font, colors. CSS will be a welcome feature that will save lot of time spend on repetitive stylingof document as it defined set of rules .

CSS allows same mark up page to be presented in different styles. If there will be more than one rules to apply to a particular element then CSS specifies the priority schemes to determine which particular rule is applied. CSS specifications are maintained by world wide web consortium (w3c). The popularity of CSS  design tool increased day by day as a  first tool to design web site. 

Prior to CSS HTML mark up contains presentational   attributes used for styling like font colors ,alignment,  borders etc.  prior CSS too much adding of style
attributes to html document ,makes document complex . therefore CSS is developed to over come the problem of html formatting.


According to CSS there are three ways of adding style to the markup document....
  •  Inline sheets,
  •  Embedded style sheet,
  •  Link style sheet.
By using these style sheets CSS defines how the html elements are to be displayed. styles are normally saved  in external. css files. External filesenables you to change the appearance and layout of all the pages in a web site ,by editing single line.

One of the goal of CSS is to allow users control over presentation. someone who find difficult to read existing text in red color can change the color of text as per his/her requirement. user can view the website in its browsers default setting.    

No comments:

Post a Comment