Which html element is semantically most suitable for displaying a group of letters?

I have a group of letters (I hesitate to use a list of words, as this may harm your answers), which I want to display in a tabular form with the columns Subject, Content, Date, Action (the value of which may contain, for example, the Delete button) .

Semantically speaking, would you use a list ( <dl>maybe) or <table>for this data? I feel that the list is most appropriate: I would describe the page as a list of letters, not a table of letters; in addition, I would not put this data in a spreadsheet or perform any analysis on it. However, the fact that I want the column headings makes me wonder if it is <table>more appropriate.

I doubt that design would ever be tabular; however, it is possible that some columns may be restyled.

+3
source share
6 answers

I'd go to table. If it had only one column, Id uses a list, but for me, at least, this is clearly tabular data, since all the β€œrows” have the same β€œcolumns”.

(Thinking of it: if your example is not suitable for use table, what else can?)

+4
source

. CSS, , . , . , , "" , .

0

<table> . , <div> . gmail ( , html).

0

, - , .

0

GMail table. , .

0

You have information that should be displayed in two dimensions (rows, columns), with each dimension describing something about the data (for example, the data number (row) and information (col)).

It sounds like a table to me, and also sounds like it would be better to consider accessibility as such! Think about screen readers that you might need to read information.

0
source

Source: https://habr.com/ru/post/1760277/


All Articles