Table2CSS Converter Other articles

When to use HTML tables in your web pages and when to avoid them

Tables are one of the most often used HTML elements, however they are also one of the most often misused ones. In this article we will try to explain when it is a good idea to use tables in your code and when it is better to avoid them. This article can also serve as a guide to the users of our Table2CSS converter program when they need to decide whether some webpage should be converted to tableless format.

What are tables used for?

Web designers use tables for multiple purposes - positioning images and text on webpages (page layout), displaying large arrays of data, creating rectangular boxes on the webpage, creating input forms, etc.

Why do people working on Search Engine Optimization (SEO) try to avoid tables?

Use of HTML tables is often frowned upon by people doing Search Engine Optimization (SEO) work. In order to understand how tables can hurt ranking of your pages we need to take a look at the way search engines rank pages. While the exact details of search engine ranking is proprietary information available only to the search engine owners, there are some practical search optimization rules obtained by trial and error.

So why do HTML tables hurt search engine optimization?

The SEO-unfriendliness of HTML tables is directly or indirectly caused by the fact that table-based layouts generally tend to create larger HTML files than pure CSS-based layouts.

What other problems can cause the inappropriate use of tables?

According to the HTML 4 specification:

Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media. Additionally, when used with graphics, these tables may force users to scroll horizontally to view a table designed on a system with a larger display. To minimize these problems, authors should use style sheets to control layout rather than tables.

If tables often hurt SEO and can cause other problems why do people still use them?

Most important reasons for the extensive use of tables are:

See also our next article in which we explain how to convert manually your html tables to tableless code.