I am trying to format 20 rows in a standard html table without any headers. The current setup looks like this: current situation
<table>
<tbody>
<tr>
<td>1</td>
</tr>
<tr>
<td>2</td>
</tr>
...
<tr>
<td>20</td>
</tr>
</tbody>
</table>
What I want is to display them in a different way that looks like the following: desired result
I believe using flexbox will help to sort them as 1, 2 on one line and then 3, 4 on the next line, etc.
I have searched extensively but couldn't find a solution that doesn't involve JavaScript or modifying the HTML. I vaguely remember it could be achieved with just a few lines of pure CSS code, but I can no longer locate that resource. Even after searching on Stack Overflow, I had no luck finding the answer. If anyone has any pointers on where I could find the solution, I would greatly appreciate it. Thank you!