Hacker News new | ask | show | jobs
by webstrand 1378 days ago
Mobile view of tables is the worst, since they almost always horizontally overflow the narrow screens. I suggest that's another reason tabular non-tables have stuck around.

Nowdays, with `display: contents` (on the tbody/tr) you can use `display: grid` to do the layout for your table, too, making it easier to make the table responsive.

CSS lets you do other fun things to tables, too. For example https://ffoodd.github.io/chaarts/pie-charts.html uses tables, but does not display like a table.

2 comments

Wouldn't table markup be the correct semantic designator for tabular data? Plus the plugins that work with tables, the ease of copying tables from the screen to spreadsheets, that screen readers know what tables are, etc.
Yeah, I'm not saying don't use tables. Do use tables, they're great for accessibility, but don't feel tied to using table layout; CSS has some great alternatives now that preserve the HTML structure of the table, but display it differently.
Have you ever done a 'View Source' on the HN comments page?