SQL PHP HTML JavaScript articles and free code
 
 

Why to use CSS, its advantages

CSS stands for Cascading Style Sheet. CSS is used to improve the presentation of the content within HTML tags. Using CSS we can define different ways of content display based on the media.

WE will discuss some advantages of using CSS

Less code
As we define the property with value at a common style class and use the same class at different locations, so we use less code. Less code means less bandwidth consumption and easy to maintain the content.

Easy maintenance
As we define styles globally or at a common place so any changes became easy. For example in a site we have all the name of the products is displayed using a particular style property. Now by changing the style class at external style sheet for the product name we can change the style through out the site. We can keep more than one style sheet and use them based on requirement. With property inheritance methods maintaining of different styles of the same tag became easy.

Higher content to code ( tag ) ratio
We can achieve higher content to code ration in a page by using CSS as we can shift the style declarations to an external file. This is important for search engine point of view. We present less tags ( style tags ) and more content to the spiders for indexing.

First download of pages.
As browsers cache the style sheet page so the page loading became fast. The styles classes are not loaded from server each time different pages of same site using same CSS is used.

Flexibility in defining style.
The name cascading indicates that we can use more than one style and the priority is given to local styles first. We can override the global style declared and locally assign the style to the tag.

We will use examples to learn about CSS and its uses in different tutorials here.
Discuss this tutorial at forum

List of HTML Tutorials

CSS: Cascading Style Sheets
Advantage of using CSS
Cascading Style Sheets
Types of Cascading Style Sheets and their priority distribution
Removing Underline from links by CSS
Fonts style control using Cascading Style Sheets
Body tag style properties in external style sheet
Header tag style properties in external style sheet
Mouse over effects of links using CSS
Links using CSS
Mouse Cursor shape or style control by Cascading Style Sheets
 

Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.

Scripts
PHP
JavaScript
List of HTML Tutorial
HTML Tags
Color Chart
HTML Calendar
Tags on web page
Web Design
Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.