Streamline your website code
I wrote this post a while back. The content can still be relevant but the information I've linked to may not be available.
One reason for moving to a CSS-based website layout is to streamline the website code. This has a number of advantages including reduced bandwidth (particularly important if you are on a hosting package that charges for this) and (potentially) better search engine listings. One other reason is that it will be much easier in future to update the website by you or anyone else. Let’s go through these….
1.Reduce your bandwidth usage
In this day and age with broadband connections becoming the norm, it’s perhaps not so important to reduce Kbs in order to improve page-loading times (although there’s no harm in thinking about this once in a while!). However, if you are paying for a hosting package that charges for bandwidth usage, reducing page code can save you money!
Some pages may have a lot of data in a tables-based layout. OK – that’s what tables were designed for. However, in other cases, try and reduce the number of tables to a minimum – or get rid of them completely. Tables use
<table> <tbody> <tr> <td> tags and these soon add up if you have a table with a few rows – or if you use nested tables to position elements on the page. It’s not called “tag soup” for nothing!
2.Better search engine listings
Most people want their keyword website content to be indexed by search engines. Make it easier by reducing the page code. Streamlining gives the page content a higher importance and will help search engine rankings in our opinion. [There are other factors that are important as well].
We were recently asked to look at a new website and offer search engine optimisation advice. The home page used 13 tables and was 23.6 Kb (without images). The home page text content was only 757 bytes. That means that only 3% of the page code was the actual visible content indexed by search engines. To put it another way, over 90% of the page was purely there to “decorate” the page. Of course, we’re not saying that black text on a plain white page is the way to go. After all, you have to design for people as well as search engines. However, there is still a lesson to be learnt here.
3.Easier website updates
You may not have come across this if you work exclusively on your own websites. However, once you start work on someone else’s website with its multitude of tags and tables, it can be difficult to understand the intricacies of the layout and very time-consuming to update it. It’s much easier to understand what’s happening if the page code is reduced and if the pages use a single CSS file.
Even with your own websites, do you ever think “I wish I could redesign this to give it a fresh look” – but do not have the time. Well, with CSS that’s much quicker. Change a background, change a few colours – and within a few minutes it can be a completely different look. You only have to look at websites like CSS Zen Garden to see the wealth of different designs that can be achieved by modifying the CSS stylesheet only.
We never used to think about streamlining the page code but, since doing so, we have found that the advantages allow us to work faster and get better results. That’s important isn’t it?
· Related » Tables or CSS for webpage layout