Jan 9, 2014

The CSS, Essential for your site to look classy.


The CSS, Essential for your site to look classy.  
CSS stands for Cascading Style Sheets. It is mainly developed for separating document content from document codesentation. Document content can be in xml, html, xhtml document. And the style is written in CSS. 

Cascading means giving priorities on the style attribute over different available style attributes based on the priority rules.Web site viewers can use a different style sheet, perhaps one on their own computer, to override the one the author has specified.
Advantages of using CSS
1. Separation of content from presentation
2. Site-wide consistency
3. Bandwidth
4. Page reformatting
5. Accessibility
Three ways of styling the web page.

CSS Priority scheme (highest to lowest)
Priority
CSS Source Type
Description
1
User defined
Most browsers have the accessibility feature: a user defined CSS
2
Inline
A style applied to an HTML element via HTML ‘style’ property
3
Media Type
A property definition applies to all media types, unless a media specific CSS defined
4
Importance
The ‘!important’ value overwrites the previous priority types
5
Selector specificity
A specific contextual selector (#heading p) overwrites generic definition
6
Rule order
Last rule declaration has a higher priority
7
Parent inheritance
If a property is not specified, it is inherited from a parent element
8
CSS property definition in HTML document
CSS rule or CSS inline style overwrites a default browser value
9
Browser default
The lowest priority: browser default value is determined by W3C initial value specifications





No comments:

Post a Comment