0

Whats the difference in using a div based product list on my ecommerce site or tables. Is the div option better performance wise? Im trying to optimize my site and I am using tables at the moment to display my products.

Thanks

Ivar
  • 786
  • 2
  • 11
  • 21

3 Answers3

3

The choice shouldn't be between divs and tables. It is between semantic markup with CSS for presentation or presentational markup / markup with wrong semantics but desired presentational side effects.

Thinking about it in terms of divs or tables tends to lead down a road of divitus, and markup that is almost as bad as abusing tables for layout.

See why not use tables for layout in HTML?

Community
  • 1
  • 1
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
0

If you just have a list of item names, use divs as it will improve performance. If you have tabular data - data with many columns - tables are the way to go.

For a similar question, see here: Actual table Vs. Div table

Community
  • 1
  • 1
zsalzbank
  • 9,685
  • 1
  • 26
  • 39
-1

It really depends. IMHO If you just want to display a grid of data, a table is likely the way to go. That being said, a div-based layout is easier to style and add/remove rows.

Dutchie432
  • 28,798
  • 20
  • 92
  • 109