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 by CSS

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.


plus2net.com




Post your comments , suggestion , error , requirements etc here .




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer