哪个 html 元素在语义上最适合显示一组电子邮件?

发布于 2024-09-15 06:17:30 字数 354 浏览 3 评论 0原文

我有一组电子邮件(我不愿意使用单词列表,因为它可能会影响您的答案),我想以表格方式显示这些电子邮件,其中包含主题、内容、日期、操作列(其值可能包含删除按钮, 例如)。

从语义上讲,您会使用列表(可能是

)还是 来存储此数据?我的直觉是列表是最合适的:毕竟我会将页面描述为电子邮件列表 - 而不是电子邮件表格;此外,我不会将这些数据放入电子表格中或对其进行任何分析。然而,我想要列标题这一事实让我想知道
是否更合适。

我怀疑设计是否会是非表格的;但是,某些列可能会重新设计样式。

I have a group of emails (I hesitate to use the word list, as it may prejudice you answers), which I want to display in a tabular manner with columns of Subject, Content, Date, Action (whose value may contain a Delete button, for example).

Semantically speaking, would you use a list (<dl>, probably) or a <table> for this data? My gut feeling is that a list is most appropriate: I would describe the page as a list of emails after all - not a table of emails; furthermore, I would not put this data in a spreadsheet or perform any analysis on it. However, the fact that I want column headings makes me wonder if a <table> is more approprate.

I doubt that the design would ever be non-tabular; however, it is possible that certain columns may be restyled.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

牛↙奶布丁 2024-09-22 06:18:05

您有一个信息需要以二维(行、列)显示,每个维度描述有关数据的一些信息(即数据编号(行)和信息(列))。

对我来说,这听起来像是一张桌子,而且从可访问性的角度来看,它也应该被更好地对待!想想可能需要阅读信息的屏幕阅读器。

You have an information that needs to be displayed in two dimensions (rows,columns), with each dimension describing something about the data (i.e. data number (row) and info (col)).

It sounds like a table to me, and also sounds like it would be better treated as such from an accessibility persective! Think of screen readers that may going to have to read the info.

柳絮泡泡 2024-09-22 06:18:02

GMail 使用表格。我不会说他们不关心语义。

GMail uses a table. I wouldn't say they don't care about semantics.

べ繥欢鉨o。 2024-09-22 06:17:59

我不确定一个比另一个更好,就我个人而言,我会使用表格。

I'm not sure one is better than the other, personally, I would use tables.

如若梦似彩虹 2024-09-22 06:17:55

一直。您可以将您喜欢的内容放入单元格的

中。适用于 Gmail(至少适用于其基本的 html 视图)。

<table> all the way. You can put what you like in the <div> in the cell. Works for gmail (at least, for their basic html view).

通知家属抬走 2024-09-22 06:17:53

不用担心造型。您可以使用 CSS 使列表看起来像典型的表格,或者使表格看起来像典型的列表。除此之外,这取决于你。对我来说,特别是因为像“列”这样的数据片段非常少,所以对于这种情况,定义列表在语义上和实践上似乎更正确。

Don't worry about styling. You can use CSS to make a list look like a typical table, or a table look like a typical list. Aside from that, it's up to you. To me, especially as there are very few 'column'-like data pieces, a definition list seems more semantically and practically correct for this situation.

谢绝鈎搭 2024-09-22 06:17:50

我会去桌子。如果它只有一列,我会使用列表,但至少对我来说,这显然是表格数据,因为所有“行”共享相同的“列”。

(想一想:如果您的示例符合使用的条件,那么还有什么可以呢?)

I’d go for the table. If it had just one column, I’d use the list, but—to me, at least—this is clearly tabular data, since all “rows” share the same “columns”.

(Thinking of it: if your example did not qualify for the use of a table, what else would?)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文