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
  • 766
  • 2
  • 10
  • 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
  • 857,932
  • 118
  • 1,152
  • 1,264
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,430
  • 1
  • 24
  • 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,462
  • 20
  • 90
  • 109