A lot of times developers focus on the look of their websites and don`t worry too much about the code, This can be a costly mistake when it comes to having your website ranked by search engines. That`s because search engine spiders aren`t too appreciative of messy coding. Some people look upon using tables as an example of this messy coding, while others swear that they`re the only way to properly present listed data. While tables can be used to organize some types of information, overuse can lead to large file sizes, which are frowned upon. Div tags are an alternative that can be difficult for beginners to use but they offer a way to cut down on the coding by storing design elements in an external CSS file. Whichever one you choose to use, you must make sure that your coding is as clean as possible and there are many tools which can help you do this.
Having clean code of your pages is vitally important, but somehow or the other it often gets overlooked. Perhaps that`s because some people just don`t realize how crucial it really is. Search engine spiders do. They use it to navigate your pages and search out your keywords and links. Think of it like this. You`ve got to find something small in a room. In which is it going to be easier to find, one that`s neat and tidy or one that has stuff strewn everywhere? It`s pretty much the same principle. That`s why optimizing HTML is so essential.
Appropriate text sizes
Links and link titles
And here are the things they hate:
Little or no relevant text
Large file sizes (especially since this slows down loading times)
Do you see how the above list looks organized? They like this too. That`s why some people choose to use tables on their sites. They find that it gives a neater look and it`s a good way to organize information. Others argue that div tags are the way to go since they can be easily used to arrange content into neat little blocks. Who`s right? Well let`s take a look at the pros and cons.
Tabular data is a part of our lives and so it is easily recognized and understood by the reader.
There is no need to use a separate style sheet so there is less work involved.
Tables don`t break, or have columns overlapping, if the content is too wide.
They`re great for creating/maintaining lists.
Having a lot of table coding on one page can make it too large and complex, increasing the possibility of bugs.
They`re not very flexible when it comes to accommodating different types of media and design elements.
They make it difficult to separate design from content.
Using divs properly can result is smaller page sizes since the tags can be stored in an external style sheet.
They make it much easier to differentiate between design elements as opposed to content.
They can cut down on development costs by not having to design separate pages for each media used.
In order to use divs, one must have some knowledge of CSS and understand what block-level elements and inline elements are. Therefore the learning curve is a bit steeper.
Older browsers can cause columns to squeeze together and become unreadable.
Div tags are prone to overuse by inexperienced programmers.
As you can see, div tags can drastically reduce the size of your pages and clearly indicate where your content is to search engine spiders but tables are better when it comes to having listed data. Some people may choose to use both, but if your site doesn`t need to have any lists it might be better to just make the effort to learn how to set up div tags and keep your HTML as clean as possible. If you already have a site which uses a lot of tables and you`d like to move to a div-based site, you`ll need to keep a few things in mind:
Work on the most important or popular pages first, especially if you have a large website. It`s best to start on outer tables if there is more than one, but be careful if they form a part of the framework.
Make sure to separate design elements from content, i.e, design elements should be included in an external style sheet.
Test pages first across a range of browsers. Older browsers can alter design elements and it`s best to know if this is happening so you can fix it if possible.
Make sure your coding is kept clean. If you`re not sure how to do this yourself, consider using a tool such as CSE Validator Pro or HTML Tidy, which can remove unnecessary tags and fix coding errors.