How can one display tables side by side in Github Markdown?

igorludi picture igorludi · Apr 5, 2017 · Viewed 9.5k times · Source

For instance, this doesn't work, tables are joined:

| Tables   |      Are      |  Cool |             | Tables   |      Are      |  Cool |
|----------|:-------------:|------:|             |----------|:-------------:|------:|
| col 1 is |  left-aligned | $1600 |             | col 1 is |  left-aligned | $1600 |
| col 2 is |    centered   |   $12 |             | col 2 is |    centered   |   $12 |
| col 3 is | right-aligned |    $1 |             

Answer

spacepickle picture spacepickle · Apr 18, 2017

Space between text marks the beginning and end of particular types of content. Try this:

<table>
<tr><th>Table 1 Heading 1 </th><th>Table 1 Heading 2</th></tr>
<tr><td>

|Table 1| Middle | Table 2|
|--|--|--|
|a| not b|and c |

</td><td>

|b|1|2|3| 
|--|--|--|--|
|a|s|d|f|

</td></tr> </table>

It will look like this:

two merkdown tables in one html table