Social Icons

Monday, 25 February 2013

which tag is better Div or Table in html

what is better to use "Div" or "Table"?


    In this article i will explain which one is better either Div or Table tag while designing a webpage.


        While Designing Webpage many people think a while to decide which one is better in terms of Loading, Flexibilty, Accessibility,Wide availabilty of browsers, Seo, Printing, Coding etc.

In terms of Loading:

  Using div's loading is faster even in mobile divices also. It will take time to load if our site contains many tables.

In terms of Accessibilty:

In terms of accessibility many people suggested to use div only using we can control decorating pages using. If we want to change any design change we can change in css only. Using table also it is possible but it is easier wit div's.

In terms of Flexibilty:

In terms of flexibilty div's are better.

In terms of Printing: 

It is not good practice to use tables for printing.

In terms of Seo:

This is the important thing we need to look. Markup tag itself will help in terms of getting traffic means a great advantage.Using div we can control the positioning of content. Basically we will post much content close to the top of html code, but it will still render in the browser same place only.Nowadays these search engine penguin algorithms are looking at page architecture also(sitemap).If we use tables we need to nest many tables. This is some what harder for spiders to read our page.If it is div's means they can easily read and categorize our content.

In terms of Page Size: 

Use div's can reduce page size. Using Div's and CSS we can decrease the html code size where as if we use table we need focus on the flow of nested tables and in some case need to include TR,TD and some case TR, THEAD, TBODY, TFOOT. Using few Div tags we can do all these things. In terms of css and javascript also div tags are better consumed.


   Tables are older and lot of nesting require it is better to avoid. But in some aspects tables only good when compare to Div's. 

If you want to be modern web developer and make efficient websites - Use Div's.


 I would like to have feedback from my blog readers. Your valuable feedback,Suggestions,Questions, Comments about this article are always welcome.

No comments:

Post a Comment

Please Give your Valuable Suggestions,Questions and Comments to improve my blog.