o0'. o0'. - 1 month ago 6
CSS Question

Is there a CSS/HTML property/attribute that can swap a table's rows & columns?

Is there a semantic CSS or HTML property/attribute to show a

table
with rows & columns swapped?

In other words, I would like to write the code one way, but have something that flips the rows with columns, and vice versa.




Looking around, I only found JavaScript ways to swap them, but in my case — that's not what I'm looking for. (If there isn't a CSS/HTML solution, then I would rather refactor the code.)

Answer

Not that I'm aware of. Looks like you want to do something like this:

How to invert the rows and columns of an HTML table?