12/11/2025 at 5:18:32 AM
I will never understand the bizarre scene of the web's smug collective declaration that tables were dead and not to be used juxtaposed against the years it took to regain the ability to reliably center things. Assuming one agrees that we even did regain it.Related: I also love when I can't paste tabular data into Excel/etc. anymore
For the record, I don't hate the idea of stylesheets, but...sheesh
by anonymars
12/11/2025 at 11:58:32 AM
> Related: I also love when I can't paste tabular data into Excel/etc. anymoreExcept that’s exactly where tables should be used. So if you can’t, someone has really misunderstood CSS.
Use it for tables, not for layout.
by Angostura
12/11/2025 at 2:07:45 PM
I’ve gotten in several arguments over the years where webdevs insisted on showing tabular data using flexbox or hardcoded div widths or worse. They insisted that html tables were never ever to be used and couldn’t be persuaded.by wanderingstan
12/11/2025 at 2:47:13 PM
If you try to render tables with millions of cells the browser does a really poor job and the performance is abysmal. The only solution when you need to render that many cells is to virtualize the table and only have the visible cells (plus some buffer) actually in the DOM at a time. That plus weird restrictions browsers put on certain table elements (looking at you thead) that prevent them from being "sticky" headers means that the developer is left with absolutely positioned divs as the only solution. Blame browser vendors for not providing a native way to present tabular data with more than a few hundred thousand rows without causing performance issues.by idbehold
12/11/2025 at 5:13:11 PM
there's table-layout:fixed that makes rendering of large tables much faster.I'd argue that if you have so many rows that DOM can't handle, humans won't either. Then you need search, filtering, data exports, not JS attaching a faked scrollbar to millions of rows.
by pornel
12/11/2025 at 2:21:29 PM
In fairness, the default `display: table` setup is often a pain to work with, so I can understand why people would opt for flexbox instead. One better option, though, might be to use `table` elements under the hood, styled with `display: grid` (and judicious use of subgrid for the intermediate elements) to get more precise control over the layout, while still using the right semantic elements underneath.by MrJohz
12/11/2025 at 5:20:00 PM
They are wrong, and didn't get the point of separating semantics and presentation.by pornel
12/12/2025 at 7:52:12 PM
I agree, but it is funny to me that your Hacker News comment is itself a table. It's in the same vein as "don't freak out, but there's a spooky skeleton inside you!"by Rendello
12/11/2025 at 7:05:18 AM
I think it was advised a bit too early, but ever since flexbox entered the scene, tables for page formatting became irrelevant.And just in case, nobody ever said tables were dead. Tables were declared bad practice for page formatting, not for tabular data.
by xboxnolifes
12/11/2025 at 7:33:03 AM
Do not use flexbox for page layout. It invites nested flexboxes, which eats your reflow performance.Use grid instead.
by cluckindan
12/11/2025 at 8:28:40 AM
Not the first time I hear of this, but I thought it was a blink-specific issue when using severely nested structures (e.g., html pages written using visual editors like Elementor or Webflow)?by easyThrowaway
12/11/2025 at 8:46:29 AM
For quite a while, I had to keep using flexbox instead of grids, because grids killed performance, funnily enough. That seems to have been rectified with modern browsers though, funnily enough.by throwaway77385
12/11/2025 at 9:02:53 AM
Flexbox is great and having nested flexboxes is also great. It makes building responsive pages a bliss. Learn it if you are having trouble with it, it is really not that difficult. Grids are much more error prone and allow for much less flexibility.by zwnow
12/12/2025 at 6:47:59 PM
The issue with nested flexboxes is that flexbox containers size their content to match the container.Therefore, to calculate the size of an item, the sizes of other items need to be known. Now, if one of the items is a flexbox, its item sizes cannot be known until the previous flexbox is laid out.
Of course, properly using flex-grow and flex-shrink can optimize that calculation, but what about deeper nested flexboxes?
by cluckindan
12/11/2025 at 8:00:09 AM
Useful insight: any sources?by twsted
12/11/2025 at 8:29:15 AM
From 2014 https://jakearchibald.com/2014/dont-use-flexbox-for-page-lay...by dekoidal
12/11/2025 at 9:14:09 AM
Browser performance tips from 2014 mean very little twelve years on. Not only have machines gotten faster and networks gotten faster, rendering engines gotten faster. And I'm doubtful it nested flexboxes would've been all that much of a problem in most cases even then.The most important thing is to use the right tool for the job. If grid lets you express what you want in the most straightforward way, use it; if flexbox does - even if it needs nesting - then use it instead. Don't shoehorn one into a situation where the other makes more sense. And sometimes either will work for a particular situation and that's fine too; use whatever you find most ergonomic. They're both very good in their own way.
by wk_end
12/11/2025 at 12:42:46 PM
The article is largely about layout shifts caused by flexbox during loading, and while networks have indeed gotten faster, they haven’t gotten faster uniformly across situations and people. Being able to show things properly while they are still downloading remains useful.by mananaysiempre
12/11/2025 at 10:03:02 AM
Try resizing a browser window with nested a flex layout.by cluckindan
12/11/2025 at 10:11:30 AM
Should you optimize for resize performance? I guess that depends on the app. Use the tool that fits the requirements.by tim1994
12/11/2025 at 12:36:54 PM
Resizing is not the optimization target, it just makes reflow performance visually apparent.by cluckindan
12/11/2025 at 10:59:31 AM
Even for layout, CSS took a long time to catch up with tables in some areas. Tables were not designed for layout, but there's a lot of aspects to them which are easier to grasp and work with than trying to get the same effect with early CSS.by rcxdude
12/11/2025 at 8:28:08 AM
They shamed everybody into the torturous use of floats for layout and then eventually, about 15 years later, added layout features back into a layout language.by KevinMS
12/11/2025 at 9:19:20 AM
I try to politely debate the proponents with each hype cycle giving them the benefit of the doubt. They lost the "lets get rid of tables" debate quite miserably. I would quickly slap something together in jsfiddle, they would try recreate it. Adding some col- and/or rowspan programmatically for cells with the same value. Give an rgba color to rows and nth cells (columns). Resizing columns by size of cell content. It took tons of ugly css to replicate. Pasting the table into a wysiwyg editor is something they can never hope to re-create.Usually I declare victory when they say that tables might get depreciated in the future.
They at one point really wanted to get rid of framesets. I asked how to make the classic scrollable resizable side top bottom UI in pure CSS. We've tried for hours, everything we tried looked ugly and didn't fully work. framesets are here to stay now :)
I still have one of the funnier "how to make this without tables?" challenges. It's not a very good example of the use of tables but did make me laugh.
by 6510
12/11/2025 at 10:18:50 AM
>Give an rgba color to rows and nth cells (columns).that sounds like a use for tables, so I find it difficult to imagine a non-table layout that would want this.
>Resizing columns by size of cell content.
I can sort of see this as a requirement for non-table layouts that would not work well, however my experience from table time was that was one of the biggest irritants at least for me, that columns would haphazardly resize based on what was in them, and sometimes you wanted them to and sometimes not. As a general rule I found it better design wise to truncate text rather than have things expanding and contracting in response to what copy editors were doing.
>framesets are here to stay now
woo yeah, I see them a lot in the wild. I mean really the only time I really see frames used anymore are iframes and generally in eCommerce and similar security requiring solutions where the frame can be partially controlled by the storefront, but is more fully controlled by the payment provider. I just find the statement "framesets are here to stay now" really weird and triumphal for something that is so rarely used?
>I still have one of the funnier "how to make this without tables?" challenges.
I followed the link, I would think it is better suited to a "why would you make this" challenge. I'm not sure
1. it shouldn't be a table. seems like maybe it should be
2. why the freaky animation. or for that matter why the animation nearly crashed my browser.
I'm definitely sure lots of designs could not be adequately achieved without tables and framesets, but my experience seems to have run contrary to yours because for me CSS was a godsend in fixing the things I found irritating about those two technologies, this does not mean that I never encountered situations where I thought this would be easier with tables, but as soon as I tried putting tables back in I found all those irritants came back in.
From my experience tables and framesets were best suited to layouts that are rarely ever wanted, and when used to implement slightly different layouts had too many problems and irritants to be useful.
Your mileage has obviously differed, but I'm not sure that "here is a particular problem that people seldom wish to solve and which I have constructed, that plays to the strengths of my favored technology while avoiding its pitfalls" is as impressive an argument as you seem to think it is.
by bryanrasmussen
12/11/2025 at 11:04:37 AM
> I will never understandI think it's fairly easy to understand if you understand what it was a backlash against. Tables today are used sensibly, for the most part, but the pre-CSS world was truly absurd in its table use.
The reaction may well have been over-the-top, but it wasn't disproportionate given the state of table usage at the time.
CSS's initial forays into layout seem bad today because people think of tables in terms of their intended use (not the now long-gone monstrosities the community actually extracted from them), but in comparison to the previous ecosystem, floats were a relative godsend.
by lucideer
12/11/2025 at 12:59:44 PM
Tables as a layout primitive are fine. Lots of modern layout engines are based around vstacks and hstacks, which are just single table rows and columns. Most paper forms use a 2d table layout, and newspapers arrange their articles in a 2d table layout.There were some reasonable concerns. Using tables for both layout and literal tables removes semantic meaning, nested tables can get complicated to layout, and layout the whole page as a giant table makes it difficult to adapt to screen size. But the first could easily be solved by adding a tag that works exactly like table but is for layout, the other two are about overuse of tables in the absence of viable options. We could have easily kept table layouts for the parts where it makes sense and augmented it with something css-like for the parts where it doesn't.
by wongarsu
12/12/2025 at 6:00:54 PM
> There were some reasonable concerns. Using tables for both layout and literal tables removes semantic meaningThe simple solution:
<table type="layout"> (or "data")
by RaftPeople
12/11/2025 at 8:29:25 PM
Thanks, I was going to say the same thing. The developer cultural context, back then, really matters.by mrdatawolf
12/11/2025 at 2:58:10 PM
This is somehow worse than "never use goto"; because there are plenty of good uses for tables, and CSS was lacking features for forever after the clowns declared "tables bad" and the other clowns followed without thinkingby PunchyHamster
12/11/2025 at 8:22:07 AM
The killer argument at the time (and even now most likely) is that screen readers could not distinguish whether the table was used for layout or for data and therefore sight-impaired users would have trouble.The argument doesn't make sense because it is not too hard for a screenreader to understand whether a table is used for layout and even if it was hard the problem would more easily be solved by just adding an attribute to the table to indicate that it is used for layout.
by erfgh
12/11/2025 at 5:36:48 AM
Tables aren’t dead, they never were… when displaying tabular data. When it comes to layout I think you might be wearing rose tinted glasses. Remember having to put a 1px image in a table cell to avoid it disappearing? Remember “best viewed at 800x600”? I’m personally not nostalgic for either.by afavour
12/11/2025 at 8:53:29 AM
For what it’s worth, the very page we’re on here still uses tables and spacer gifs, in 2025. (EDIT: I don’t mean to imply that this is good, just an inescapable observation in this context)by tobr
12/11/2025 at 9:20:17 AM
Probably why there are endless reworkings of the site.by Popeyes
12/11/2025 at 4:09:09 PM
I imagine it's also why its size is measured in kilobytes and loading time in millisecondsby anonymars
12/11/2025 at 8:23:16 AM
There were better solutions to those problems than the CSS debacle.by erfgh
12/11/2025 at 9:04:20 AM
> Remember having to put a 1px image in a table cell to avoid it disappearingIsn't this a trivial problem to solve that doesn't require introducing any new layout mechanisms?
by eviks
12/11/2025 at 9:31:42 AM
at least they were specificToday it's usually implicitly designed for iphone, designed for 1080p, or ipad, and you have to guess, strong correlation with whatever device the designer uses in his personal life.
by dahcryn
12/11/2025 at 2:28:23 PM
...no? Today's sites use responsive design and adapt to pretty much any screen size.by afavour
12/11/2025 at 4:52:31 PM
> Today's sites use responsive design and adapt to pretty much any screen size.Today sites certainly can and some (many) so. But some (also many) definitely don't…
A lot are locked to a maximum width, which is OK enough as l……o……n……g lines of text are unpleasant to read, but only because browsers hack the meaning of dimension settings to make text zoom work consistently.
A lot also have an effective minimum width (even if they use responsive styling to move/ minimise/hide side decoration before a certain point) that is not always convenient. Try browsing with a thin window so you can have something in the other side of your screen. Some assume no one on desktop will ever have a browser window less wide than 1280 pixels (or equivalent on a zoomed higher res screen) - not the case on my 1080p portrait screen and I sometimes want things thinner than 1280 on my 2560x1440 screen. You could say I'm just odd and they can't cater for everyone, but 1080 or a bit less wide is hardly miles away from many devices physical layout so if a design can't display nice in that can it really call itself "responsive" (I suspect any such design would fail on many mobile devices too - 1080px effective width is rather common there, as are smaller widths).
by dspillett
12/11/2025 at 5:28:09 AM
My favorite part about that is how we came back around to display:gridby ModernMech
12/11/2025 at 5:39:47 AM
Until then, display: table kept everyone calm.by windows2020
12/11/2025 at 5:58:47 AM
No, dealing with tables was like trying to build a house out of tempered glass.With css grid, I can tell each element which area or column+row to occupy.
If I add or remove a random element, the rest of the elements stay in the correct place.
But do that with a table and you end up trying to glue your house back together shard by shard whilst trying not to cut yourself or breaking things more.
by spartanatreyu
12/11/2025 at 6:40:46 AM
> If I add or remove a random element, the rest of the elements stay in the correct place.This complaint highlights how absurdly not fit-for-purpose html+css actually is. Okay, you may want to do "responsive" design, but you have the semantic layout fixed, therefore you try and contort a styling engine into pretending to be a layout engine when in reality it is three stylesheets in a trenchoat.
by friendzis
12/11/2025 at 8:35:51 AM
> Okay, you may want to do "responsive" design, but you have the semantic layout fixed, therefore you try and contort a styling engine into pretending to be a layout engine when in reality it is three stylesheets in a trenchoat.I need to write this up properly, but one of my bugbears with responsive design is that it became normalised to push the sidebar down below the content on small screens. And if you didn't have a sidebar, to interweave everything in the content no matter what screensize you were viewing on.
What I want is a way to interleave content and asides on small screens, and pull them out into 1+ other regions on larger screens. Reordering the content on larger screens would be the icing on the cake but for now I'll take just doing it.
This CSS Grid approach adds gaps: https://codepen.io/pbowyer/pen/azNarbZ
Using named grid-template-areas stacks the items you move to the sidebar on top of each other, so you only see one of them.
'Good' old floats get most of the way, but put the item in the sidebar exactly where it falls. Plus they're a pain to work with overall: https://codepen.io/pbowyer/pen/jEqdJgP
by pbowyer
12/11/2025 at 10:27:41 AM
>This complaint highlights how absurdly not fit-for-purpose html+css actually is. Okay, you may want to do "responsive" design, but you have the semantic layout fixed,this not fit for purpose may in fact be historically superseded usages that still are baked in to some usages affected by the relatively rapid change of the various platforms that must interact and use the respective technologies, the specification version of "technical debt"
that is to say some subsets of the numerous technologies can be used to construct something fit for the purpose that you are describing, but as a general rule anything constructed in a solution will probably be using other subsets not fit for that particular purpose, but maybe fit for some other purpose.
by bryanrasmussen
12/11/2025 at 8:26:36 AM
sidenote: as a teen, i would regularly layout posters and presentations in excel.. the page preview dashed-border and the grid stability was such a relief compared to wordby agumonkey
12/11/2025 at 10:13:45 AM
On commodore 64 the screen is just a fixed size grid of characters. No one ever had issues making an ui. We pretend but flexible viewport size is not actually possible. If you are making a painting for example the size of the canvas greatly influences what can and can be done.I made a stunning landscape photo one time that looked great only when displayed at roughly the size of a hand. If made larger undesirable details became visible (littering), when smaller important details were lost (a formation of birds over a fishing vessel).
by 6510
12/11/2025 at 10:26:46 AM
> We pretend but flexible viewport size is not actually possible.Not beyond a point, but it's still very useful to be flexible up to that. For example, I'm very grateful that a web page will reflow text rather than print everything on one line and force horizontal scrolling.
by oneeyedpigeon
12/11/2025 at 12:10:47 PM
Yet, for some reason, mobile browsers do not reflow when you zoom in, but instead insist on horizontal scrolling, unlike their desktop counterparts. I've never understood that.by Timwi
12/11/2025 at 1:40:59 PM
Firefox has a "Desktop site" switch that when disabled changes this behavior.by hypertele-Xii
12/13/2025 at 11:35:35 AM
No, it does not change the zoom behavior.by Timwi
12/12/2025 at 3:37:33 PM
It is not like we have a choice. I forgot to mention that people also have different eye sight which further complicates things. Some set the font so large half the apps fail to fit. Before many people had one I see someone browse using an enormous TV with very high resolution. The google adds sidebar lived on the other side of the room. % size images upscaled into a pizza of artifacts. There wasn't a website that looked the way intended. A funny I ran into once was Lubuntu system dialogs with the accept button below the screen. I've also seen enough print previews where one cant read the text. The use of colors with poor contrast only on some displays.We are having a lot of fun pretending it is possible.
by 6510
12/11/2025 at 12:31:23 PM
> the ability to reliably center things. Assuming one agrees that we even did regain it.Is there anyone who does not agree that we can reliably center things in CSS nowadays?
by Vinnl
12/11/2025 at 1:21:26 PM
At least one person. https://tonsky.me/blog/centering/by pglevy
12/11/2025 at 1:42:35 PM
Haha fair, we do still suck at properly centering text, I'll give you that.by Vinnl