Skip to content

Instantly share code, notes, and snippets.

@metacollin
Forked from mokagio/tables.md
Last active April 14, 2023 12:55
Show Gist options
  • Save metacollin/8193fc25b0c3f1e1c7df0f674b2c7da9 to your computer and use it in GitHub Desktop.
Save metacollin/8193fc25b0c3f1e1c7df0f674b2c7da9 to your computer and use it in GitHub Desktop.
How to do tables in GitHub flavoured Markdown

This:

heading 1 | heading 2 | heading 3
--- | --- | ---
abc | bcd | cde
def | efg | fgh

becomes this:

heading 1 heading 2 heading 3
abc bcd cde
def efg fgh

You can also use plain old HTML tables. This:

<table>
  <tr>
    <th>heading 1</th>
    <th>heading 2</th>
    <th>heading 3</th>
  </tr>
  <tr>
    <td>abc</td>
    <td>bcd</td>
    <td>cde</td>
  </tr>
  <tr>
    <td>def</td>
    <td>efg</td>
    <td>fgh</td>
  </tr>
</table>

becomes this:

heading 1 heading 2 heading 3
Part Count Overage

Using HTML is handy because you can do more advanced things like nested tables, or adding lists within cells.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment