有可能在Markdown中创建一个没有标题的表吗?

HTML看起来是这样的:

<table>
<tr>
    <td>Key 1</td>
    <td>Value 1</td>
</tr>
<tr>
    <td>Key 2</td>
    <td>Value 2</td>
</tr>
</table>

当前回答

<style>
    .headerless th {
        display: none;
    }
</style>

<div class="headerless">

| | |
|---|---|
|Some |table |
| WITHOUT | header |
</div>

|This|is|
|---|---|
|Some |table |
| WITH |header |

其他回答

什么工作在GitHub问题编辑器是

&nbsp; |&nbsp;
------ | ---
Foo    | Bar

但它确实显示了一个空标题

以下工作很好为我在GitHub。第一行不再是粗体,因为它不是一个标题:

<table align="center">
    <tr>
        <td align="center"><img src="docs/img1.png?raw=true" alt="some text"></td>
        <td align="center">Some other text</td>
        <td align="center">More text</td>
    </tr>
    <tr>
        <td align="center"><img src="docs/img2.png?raw=true" alt="some text"></td>
        <td align="center">Some other text 2</td>
        <td align="center">More text 2</td>
    </tr>
</table>

在这里查看一个没有标题的HTML表示例。

<style>
    .headerless th {
        display: none;
    }
</style>

<div class="headerless">

| | |
|---|---|
|Some |table |
| WITHOUT | header |
</div>

|This|is|
|---|---|
|Some |table |
| WITH |header |

至少对于GitHub flavated Markdown,你可以通过使用常规的__或**格式使所有非标题行条目加粗来产生错觉:

|Regular | text | in header | turns bold |
|-|-|-|-|
| __So__ | __bold__ | __all__ | __table entries__ |
| __and__ | __it looks__ | __like a__ | __"headerless table"__ |
$ cat foo.md
Key 1 | Value 1
Key 2 | Value 2
$ kramdown foo.md
<table>
  <tbody>
    <tr>
      <td>Key 1</td>
      <td>Value 1</td>
    </tr>
    <tr>
      <td>Key 2</td>
      <td>Value 2</td>
    </tr>
  </tbody>
</table>