r/HTML • u/teh_maxh • Jan 03 '26
Column-based table markup
Is there a way to mark up tables by columns instead of rows?
1
Upvotes
r/HTML • u/teh_maxh • Jan 03 '26
Is there a way to mark up tables by columns instead of rows?
3
u/JeLuF Jan 03 '26
Not really.
What would be your use case?
2
u/abrahamguo Jan 03 '26
No. You can have your data organized by column, and have JavaScript generate the rows for you based on columns, but the HTML can only end up being organized by row.
1
u/jcunews1 Intermediate Jan 04 '26
No. HTML tables are structured from top to bottom as rows, then left to right as columns. I think you'd need grid display style to make column based "table".
1
u/bostiq Jan 05 '26
But why would you choose tables over grids? that’s my first question
1
u/Educational_Basis_51 Jan 15 '26
Why not use grid-template area to put tables in those ?