开发者

Is a list of rows and columns better implemented with tables or DIVs?

开发者 https://www.devze.com 2023-01-31 11:55 出处:网络
Is a list of rows and columns with very mixed data types better implemented with tables or DIVs? For example, these two pages are similar.开发者_如何学Go Ebay uses tables and Etsy uses DIVs:

Is a list of rows and columns with very mixed data types better implemented with tables or DIVs? For example, these two pages are similar.开发者_如何学Go Ebay uses tables and Etsy uses DIVs:

http://antiques.shop.ebay.com/Sterling-Silver-925-/2213/i.html http://www.etsy.com/category/books_and_zines?view_type=list

Which approach is "better"?


IMHO, if it's "data" being displayed (like either of the examples you provided), it make perfect sense to use a table.

If on the other hand, the table is being used as a way to actually define the visual layout of a page, then it is better not to use tables but instead use DIVs and style with CSS.

I follow this and it works well : Table is for data; DIV is for visual division (or Data => Table; Visual => DIVision)


Although using divs and css is currently in fashion, just use a table for rows and columns. That's what it was made for.

0

精彩评论

暂无评论...
验证码 换一张
取 消