Or other CSS facilities if you have to support sucky browsers.
I spent the first five years of my career advocating for replacing table layouts with CSS, and finding ways to do just that.
My point is simply that we seem to have gone overboard.
Part of that movement was towards what we called "semantic" markup. Wrapping your content in HTML tags that describes what the content is for (a heading, a list, etc) instead of how it should look (bold, larger font).
One of the reasons that tables were terrible for layout was that with tables you had to use markup that meant different things than what you were trying to accomplish. Among other things, this badly screwed with screenreaders and other software parsers (crawlers, including those of the major search engines; and scrapers).
But for actual tabular data, HTML tables are the semantically correct markup. They work well and can be parsed correctly. The point of the semantic markup movement was never to completely remove tables from our vocabulary. It was to return them to their proper use case.
While we did manage to come up with CSS alternatives for nearly all the table based layout features, CSS Grid is the first option that gives you the full power that tables offered (and more) for the grid-based layouts that have been a staple of graphic design since the creation of the first coffee table book.
But this package reminds me of the straw man argument that some old school developers used to bring up when we encouraged them to learn CSS for layout: "if we get rid of tables, we'll have to come up with insane workarounds for displaying tabular data".
I spent the first five years of my career advocating for replacing table layouts with CSS, and finding ways to do just that.
My point is simply that we seem to have gone overboard.
Part of that movement was towards what we called "semantic" markup. Wrapping your content in HTML tags that describes what the content is for (a heading, a list, etc) instead of how it should look (bold, larger font).
One of the reasons that tables were terrible for layout was that with tables you had to use markup that meant different things than what you were trying to accomplish. Among other things, this badly screwed with screenreaders and other software parsers (crawlers, including those of the major search engines; and scrapers).
But for actual tabular data, HTML tables are the semantically correct markup. They work well and can be parsed correctly. The point of the semantic markup movement was never to completely remove tables from our vocabulary. It was to return them to their proper use case.
While we did manage to come up with CSS alternatives for nearly all the table based layout features, CSS Grid is the first option that gives you the full power that tables offered (and more) for the grid-based layouts that have been a staple of graphic design since the creation of the first coffee table book.
But this package reminds me of the straw man argument that some old school developers used to bring up when we encouraged them to learn CSS for layout: "if we get rid of tables, we'll have to come up with insane workarounds for displaying tabular data".
Well, someone just did.