Monday, September 13, 2010

Separating content from design


Do you ever do any of the following?
Use tables for website layout
Use invisible GIFs to “push” elements around your web page
Hack Photoshop documents to bits and stitch them back together in a web page to
create navigation elements and more
Get frustrated when any combination of the previous leads to unwieldy web pages
that are a pain to edit
If so, the idea of separating content from design should appeal to you. On one hand, you
have your HTML documents, which house content marked up in a logical and semantic
manner. On the other hand, you have your CSS documents, giving you site-wide control ofthe presentation of your web page elements from a single source. Instead of messing
around with stretching transparent GIFs, and combining and splitting table cells, you can
edit CSS rules to amend the look of your site, which is great for not only those times when
things just need subtle tweaking, but also when you decide everything needs a visual overhaul.
After all, if presentation is taken care of externally, you can often just replace the CSS
to provide your site with a totally new design.
Designers (and clients paying for their time) aren’t the only ones to benefit from CSS.
Visitors will, too, in terms of faster download times, but also with regard to accessibility.
For instance, people with poor vision often use screen readers to surf the Web. If a site’s
layout is composed of complex nested tables, it might visually make sense; however, the
underlying structure may not be logical. View the source of a document and look at the
order of the content. A screen reader reads from the top to the bottom of the code and
doesn’t care what the page looks like in a visual web browser. Therefore, if the code compromises
the logical order of the content (as complex tables often do), the site is
compromised for all those using screen readers.
Accessibility is now very important in the field of web design. Legislation is regularly
passed to strongly encourage designers to make sites accessible for web users with disabilities.
It’s likely that this trend will continue, encompassing just about everything except
personal web pages. (However, even personal websites shouldn’t be inaccessible.)

No comments:

Post a Comment