Cascading Style Sheets (CSS) and XHTML

Hyper Text Markup Language (HTML) was originally created as a means of structuring documents in a logical way - documents (often scientific) that adhered to a structure of headings, subheadings and paragraphs. However, along the way the semantics were lost - tags were used for things for which they were never intended - tables were used for layout purposes, headers to create font effects, alt tags to provide inappropriate alternatives to image content and so on. One particular problem was the use of font tags throughout the code in order to change presentation. Imagine a site with 2000 pages, each containing 20 font tags and your Project Leader says, "OK, let's change the site font from Times New Roman to Verdana". This would mean changing each font tag by hand - a Herculean task.

Cascading Style Sheets

Then along came CSS (Cascading Style Sheets). CSS was conceived as a way of styling html pages without using html tags. There are many advantages to using CSS, the main ones being:

  1. Separation of presentation from content - the heart of the CSS matter.
  2. Faster page download times - the style sheet is downloaded only once and stays in the browser cache for each subsequent page that references it, cutting down dramatically on download times.
  3. Increased design possibilities - presentation possibilities are almost endless with the vast array of CSS techniques available - check out The CSS Zen Garden, which is a showcase for anyone who might doubt the cause.
  4. Easier site maintenance - in the case of the site-wide font change, simply altering one line in the CSS would change the entire site font.
  5. Search-engine friendly - removing all the spurious html would also help sites vis-à-vis the search engines; with much less content to crawl, they would do their job quicker and the site content would not be watered down by inappropriate html tags.
  6. Accessibility - The US has already made it law that all government-run web sites follow guidelines set out in section 508 of the Federal Rehabilitation Act, which refers to accessibility. The separation of presentation from content makes page content far more accessible and user-friendly, especially when using screen-reading technology - invaluable for surfers of the net with visual impairments.

Sites Using CSS

As you can see, CSS development is the way forward, with many of the major sites having already changed over (check out this list of major players who have made the switch), cutting down on long-term maintenance costs and making life easier for those of us who are not fortunate enough to have all their senses intact.

XTHML

XHTML (Extensible Hyper Text Markup Language) is an XML-based, standards-compliant version of HTML which is much stricter and results in cleaner code, which again assists with accessibility, maintenance and download times. Putting these two together, you can clearly see the benefits of using xhtml and css to code your website.

Web Design Articles

Birmingham Content Management Systems (CMS)
Birmingham Web Solutions
Birmingham Search Engine Optimisation
Birmingham Web Design