Menu
  • +91 11 4100 3450
  • +1 212 796 6904
  • +44 0207 849 6867
Check Your Pixel Perfect

Why Using Tables For Layouts Is Not A Good Idea For Web Developers

Why Using Tables For Layouts Is Not A Good Idea For Web Developers

Unless you are a rookie web developer, use of tables in your website designing or development is not really a good idea. If you are not convinced, read on to see the many disadvantages of using tables and advantages of using Cascading Style Sheets (CSS).

One of the obviously advantages of using CSS is that it imparts a global look and feel to the website whereas use of tables and table-level formatting means that there is no uniform style applied to the website as a whole.

While HTML 4.1 specs had declared use of tables to be invalid, HTML5 has made tables valid but still the specs say: ‘tables should not be used as layout aids.’ So, clearly while you are allowed to use tables, they are not recommended by the W3C.

Complex Code Leads to Lack of Flexibility
Use of tables in website design and development leads to complex code with HTML tags like <tr>, <td>, <colspan> and <rowspan>. With each tag getting a line of code, a large table leads to a lot of lines of code which become complex and hence difficult to maintain, particularly with the passing of time or changes in web personnel. What may be obvious to the person who wrote it may not be so obvious to another designer or developer down the line hired to make changes to the website.

Maintenance Challenges
As alluded to above, use of tables makes a website difficult to maintain. Website maintenance means changes to the website and some websites may require more frequent changes than others. Use of tables means the layout is part of the HTML; hence, making global changes to the website means making changes in every instance where a table is used for the look of the website. On the other hand, when a website design uses CSS in place of tables, the layout info is in a CSS document; hence, when some change needs to be effected across the entire website, all you need to do is change it in one single file — the CSS file.

CSS is Good for SEO
CSS makes the site better from a Search Engine Optimization (SEO) perspective. This is because use of CSS means your site’s HTML code has less code making it easier for search engine spiders to crawl your website. Use of CSS means a website’s HTML has more content and less code rather than the other way around. This makes the website more readable to the search engine spiders improving the site’s SEO. In addition, it will help your site load faster which is another Search Engine Optimization (SEO) benefit.

CSS Makes Websites Accessible
Use of CSS files to define the presentation of content (how it looks) means it no longer has to be embedded into theHTML of every page. Thus, you can apply and change the formatting of content across pages by making changes in a single CSS file and without having to format or re-format the content of the page itself.

Using CSS to define font sizes ensures that the website looks fine and renders correctly across different browsers. With CSS, you can serve different style sheets to different devices thus making the website more accessible by making it screen reader friendly. By making the website accessible to people with disabilities, you are not only creating a website that you can be proud of, it might also be necessary to meet the statutory requirements of the country that you operate in.

Websites With CSS Load Faster
Apart from these benefits, a website with tables takes two to four times longer to load than a website with CSS in it. In an age of mobile browsers, website loading times can make an enormous difference as it has been shown often that users tend to lose their patience when a website takes longer than seven seconds to load. If your website takes a long time to load, then not only will users likely click to the next website, it also imposes an SEO effect as search engines like fast loading sites

Summary
All these things considered, it’s pretty clear that the way forward is to use CSS in website design rather than opting for tables. We hope this list of reasons why not to use tables has been useful to many people who were not sure which way to go. If you would like to discuss in more detail or have any questions, please feel free to reach out to the team at ConvertPSDfiles.

 
By: Yusuf JavedApril 2nd, 2016
no results available now.


Leave a Reply






<< back