Why Should You Use CSS?

Written by:  • Edited by: Linda Richter
Updated Apr 2, 2010
• Related Guides: Web Browser | HTML

CSS has been a major player in web development since its introduction in 1993, yet many new web developers continue to code their websites using HTML and tables to display information on their web pages. CSS offers an easier way to develop your websites, and it is relatively easy to learn as well.

What is CSS?

Before you understand the need for CSS, you must first understand what it is. CSS is a stylesheet language designed to dictate the display properties of the structured elements in an HTML or XHTML file. CSS uses properties in conjunction with HTML elements to define the way a web browser should render an HTML document and it fulfills the goals of HTML developers to separate the style of a web page's design from its structure.

HTML was designed to give authors define the structure of documents by placing segments of their document within tags that declare "this is a heading", "this is a paragraph", "this is a quote", as well as other divisions of the text. HTML defines these elements of a document with tags placed around the segments such as <h1>, <p>, and <q>. HTML was not intended to define the way the document was displayed; it's purpose is simply to define the structure of the document. As browsers were developed each browser's developers added additional elements to the HTML definitions to change the way the documents were displayed. The ability to change font colors, sizes, background colors and more were added by browser's developers but each browser had its own supported elements and there was no standardized styling format for HTML documents, requiring developers to write styles into their HTML documents and make hacks for the different browsers because each browser handled styles in their own way.

To solve the problem of a lack of standardization in both HTML and style, the W3C (World Wide Web Consortium) was formed. The goal of the W3C is to set up standards for coding and scripting languages used for the web. CSS was adopted and implemented by the W3C and the consortium convinced browser developers to support the standards defined by CSS to create a more uniform way to display and develop web pages and documents. Currently, all browsers support CSS, although each browser differs slightly in their rendering of elements and styles. With the adoption of CSS standards, web developers can design and develop web pages that are displayed nearly the same in every browser.

Why Use CSS?

Are you still wondering why you should take the time to learn a new language for writing web pages when what you're doing seems to work just fine? The following list contains some of the most advantageous reasons to begin using CSS to style your web documents, and we'll go over them in more detail.

  • Gain more control over the display and presentation of your content
  • Design without jeopardizing the structure of your page
  • Reduce the likelihood of validation problems and errors in your HTML code
  • Make site-wide changes with ease
  • Minimize download times and bandwidth usage
  • Enable screen readers to deliver the content of page in a preferred order
  • Allow users to change the styles they see
  • Reduce time and frustration of coding
  • Make your pages accessible to a wider variety of devices
  • Improve site usability and readability
Showing page 1 of 2

 
blog comments powered by Disqus
Email to a friend