Live data from Hacker News

Do you know that there is an HTML tables API?

christianheilmann.com

1–10 of 206 posts

Re: Do you know that there is an HTML tables API?

#8
post #2

Tables died (thankfully) to make room for flex and grid. I can't see any use case for them at all anymore.

How about displaying data in rows and columns in a accessible and easily styled way, without having to rely on JS and your own CSS to replicate a table? How exactly would you do that with HTML and CSS without using tables? Using flex and grid for those purposes don't make much sense unless you care about design above all else.

just gives you so many good defaults (semantic structure, accessibility, column styling, column alignment, keyboard navigation) for free compared to using CSS to create your own table, that I'm not sure why you wouldn't use for tabular data.

Of course, if you need masonry, card grids and so on it makes sense, do actual layouting with layouting tools. But thankfully hasn't died just yet, it's still better than CSS for many use cases.

Re: Do you know that there is an HTML tables API?

#9

> That way they’d finally get the status as data structures and not a hack to layout content on the web. I remember doing this 25 years ago, but I assume (and hope) it's a huge minority who do this today?

cough view-source:https://news.ycombinator.com/item?id=45781293 cough

Re: Do you know that there is an HTML tables API?

#10
post #2

Tables died (thankfully) to make room for flex and grid. I can't see any use case for them at all anymore.

This implies that you were considering -- for a split second -- making a 90s style table based website layout, using the Tables API? ;) I might have to try that now...
Post reply on HN