1

I have information from a database. It is one row. Now, it is old, and tables were used to display the data. It works but is ugly and hard to maintain. I'm "fixing" it. But, I don't know if it is considered tabular or not. It comes from database tables, but I don't know that what it means to be semantically correct in using a table for display.

I have several sections like this on a webpages. They are all calls to the same database, different sets of data, sectioned off in the webpage.

For example, one set is a general set of information, lastname, firstname, middle, other stats...

Next section might be address, etc.

A while back when I did asp.net forms there was a list view, I think that was similar to what I need to create (I'm using just straight html and a scripting language, no controls).

How should I be displaying the information to be semantically correct?

edit: It is one person that does not repeat.

edit: A single record, but displayed on the same page, just various SELECT statements to get that data all on the same page.

4

1 回答 1

1

如果它是表格数据(即显示在彼此下方的多条记录),那么 a<table>可能是最佳选择。如果它是单个记录的视图,甚至可能聚合来自多个表的数据,那么它<table>不应该是您的首选。

表格数据:

 --------------------------------
| ID | Name | Description | Date |  
 --------------------------------
| 01 | ...  | ...         | ...  |
| 02 | ...  | ...         | ...  |

非表格数据:

ID:          ...
Name:        ...
Description: .................
             .................
             .....

Date:        ....
于 2012-11-20T18:54:06.737 回答