Hacker News new | ask | show | jobs
by MarcellusDrum 1625 days ago
Serious question: What is inherently wrong with using Tables for organizing simple layouts? Is it frowned upon just because it is a "hacky" way of doing stuff?
3 comments

I think it would be hard to make it responsive. Also, table is a semantic element. You should use it unless you're displaying tabular data.
I wonder how many millions of man hours could have been saved over the last twenty years if we could have added semantic="false" to our tables rather than redesigning everything.
You can make them responsive easy enough if you override all the table styling. I've done that before.

For me it's the semantic meaning, a table is tabular data.

However, I must say that using CSS grid is just like the old table-based design days.

https://twitter.com/Martin_Adams/status/1477214581449793538?...

Tables "mean" tabular data... grids of values with headings. The intent was that software could consume tabular data for processing without having to worry that it might be a "table for layout".

"table-like" layouts made using <div>s and CSS, including `display: table` are fine.

The original reason webmasters (remember them?) were discouraged from using tables for layout is that you quickly ended up with many layers of nested tables. The browsers at the time were not performant enough to handle it and the user experience suffered.