Tuesday, October 6, 2009

Optimizing your HTML code

I'm revisiting a few important topics from the web design realm this week. There are a few topics that keep rearing their heads so I can't help but react to the questions.

My previous post regarding design for the iPhone continues to be a hot topic and now we're off to optimizing your HTML Code.

I wrote a post about optimizing your HTML code back in May of 2007 and over 2 years later this continues to be a primary factor in every web design we create. As far as we are concerned, clean HTML code is of paramount importance for a few very good reasons, not the least of which is good will towards your visitors!

Obvious reasons to optimize your HTML:
  1. About 9% of adults are still using dial-up for their Internet connections;
  2. Google is a busy search engine;
  3. Bing is a busy search engine;
  4. W3C Validators don't like old code;
  5. The online visitor represents a fickle, impatient audience.
You simply must present a fast-loading, correctly coded website to each visitor. A large percentage of page visits will fall into the group of "less than 15 seconds" per page. We're talking about 35-45% of all your page visits will happen in less than 15 seconds.

Optimizing your HTML code:

The key to any optimization is to take a 2-phase approach to your work. The idea is to remove as much HTML code as is possible, leaving a high percentage of content to code.
  1. Centralize all formatting in linked style sheets.
  2. Centralize all javascript in linked files.
  3. Remove tables and use <div> layers for positioning.

This process will take some time but the dividends will pay off in spades. HTML code errors will drop to zero and your pages will load lightening-quick.

No comments: