Is it ok to still use tables?

Possible Duplicate:
Why not use tables for layout in HTML?

Just wondering, I thought I have read before that it is bad to use tables, so my question is, is it still acceptable to use tables in development?


If you're presenting tabular data, it's fine to use tables. If you're doing layout, it's usually easier and lighter to use a few divs (and use a CSS framework like YUI or Blueprint) to do your work.


Yes. Tables are very good (even preferred) for tabular data.

For layout alone, there are newer and better options.


Tables work best for tabular data - if you are showing results of some query, like a list of customers or transactions or currency values, go ahead, you should be using tables.

What is bad is using tables for layout where the logical orger is not left-to-right ie if you have a navigation pane on the left, do you want to read the navigation before the content? probably not...

However if you have a form with labels and input fields do you want to read the label before the input control, yes, you probably do.

The reason for this is that screen readers and similar assistive technologies force this order on their users. also it is usually much harder to read the resultant HTML when you use tables for layout

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

上一篇: 基于布局与Div

下一篇: 仍然可以使用表格吗?