Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

When people say not to use tables they mean <table><tr><td>for layout of the entire page</td></tr></table>


They should not have advised against that either.

It was a much saner, simpler, and more efficient mechanism that the clear/float monstrocities imposed upon people in the period before grid, which reinvented the same thing (table layout) just without the actual tags.


You could use ‘display:table’ in CSS if you wanted a tabular layout without using the table-tags. This has been part of CSS for 25 years.

Grid is newer and more powerful.


display:table was never really evangelized for tabular layout. They were pretty much ignored and the literature and documentation missed the point. Tabular layout is really just another word for grid layouts. Grid layouts took forever to arrive. Tables were the only reliable way lay things out in a grid for a very long time and yet were discouraged regardless. There were people who knew about display:table and used it and some of us were nevertheless told we were doing it wrong because people got hung up on the word table.

Like many things in CSS features that should have been present in the original 2.0, when it became clear that the web wanted to be laid out like a magazine, Took multiple decades to actually appear. As a result we are still seeing the fallout of those failures in our ecosystem.


Sorry are you saying ‘display:table’ was not viable for grid-like layouts because someone might confuse it with the html <table> tag?

That is like saying Go is not a viable programming language because someone might confuse it with GOTO and consider it harmful.


I'm saying that CSS has always had really confusing messaging around what is considered good practice and what is considered bad. If CSS had actually had the equivalent of Go's stdlib and documentation with well established good practices that were pragmatic we would be having a very different conversation right now.


> they mean

They shouldn't had mean, they should had said that.

Because 99% of time we have a bunch of <p> in assortments of <div> representing a tabular data. Dozens of "web" "front-end" "frameworks" doesn't help it in any way, too.


Yes, table for layout and table for tabular data is different things. This was usually very clear in advices. Don't use <table> for layout. DO use <table> for tables.


and instead we have a clusterfuck of <div> with tons of attrs.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: