Divs Versus Tables with respect to performance

I want to know which structure is better a div or a table with respect to the performance. It is difficult to work with divs rather than table. Then why use divs instead of tables and also tell me where we should use tables and where the divs


Donald Knuth was once quoted as saying:

We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.

With respect to your question, in all but the most severe edge-cases where you cater to slow connections on archaic browsers, I would say the difference between divs and tables (in performance) is something that should not even be considered a factor.

Now, you say that it is more difficult to work with divs rather than tables (I thought so too when I started), but as you learn more css and how it works, you may have a change of mind. Divs+CSS are actually incredibly easy to work with and most importantly make your code maintainable , something that tabled layouts can never achieve (IMHO). Using Divs+CSS will--in the long run--save you a tremendous amount of time programming.


divs using un ordered lists with list items will give you cleaner code that you can maintain and upgrade for the future. also divs make better use of css which gives you more flexibility for styling and integration with javascript. I never use tables and dont see any advantage to them.


Div is very simple. It will be easy to create complex structured web pages with div.

It would be great to use table for creating tabular data. For structuring a webpage I prefer Div Tags.

链接地址: http://www.djcxy.com/p/88154.html

上一篇: 表,列表,CSS的divs?

下一篇: 关于表现Divs Versus表