如何在 Github Markdown 中并排显示表格?

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

例如,这不起作用,表已连接:

| Tables   |      Are      |  Cool |             | Tables   |      Are      |  Cool |
|----------|:-------------:|------:|             |----------|:-------------:|------:|
| col 1 is |  left-aligned | 00 |             | col 1 is |  left-aligned | 00 |
| col 2 is |    centered   |    |             | col 2 is |    centered   |    |
| col 3 is | right-aligned |     |             

对于GitHub,您可以使用以下格式并排显示两个表格。这是我通常做的方式:

|Table 1|Table 2|
|--|--|
|<table> <tr><th>Table 1 Heading 1</th><th>Table 1 Heading 2</th></tr><tr><td>Row 1 Column 1</td><td>Row 1 Column 2</td></tr> </table>| <table> <tr><th>Table 2 Heading 1</th><th>Table 2 Heading 2</th></tr><tr><td>Row 1 Column 1</td><td>Row 1 Column 2</td></tr> </table>|

可以看到输出here.

注意:请不要使用新行,否则将不起作用。

文本之间的

Space 标记特定类型内容的开始和结束。试试这个:

<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>

看起来像这样: