Skip to content

Instantly share code, notes, and snippets.

@panoply
Last active January 3, 2026 13:38
Show Gist options
  • Select an option

  • Save panoply/176101828af8393adc821e49578ac588 to your computer and use it in GitHub Desktop.

Select an option

Save panoply/176101828af8393adc821e49578ac588 to your computer and use it in GitHub Desktop.
2 column full width table for github markdown

Equal widths

Github markdown full-width 2 column table.

EXAMPLE TEXT

EXAMPLE TEXT

{
  "foo": [
    {
      "bar": "hello world"
    }
  ]
}
{
  "foo": [
    {
      "bar": "hello world"
    }
  ]
}
Column 1 Column 2

Source

Don't indent the syntax, Github seems to have issues with indentation.

<table>
<tr>
<th align="center">
<img width="441" height="1">
<p> 
<small>
EXAMPLE TEXT
</small>
</p>
</th>
<th align="center">
<img width="441" height="1">
<p> 
<small>
EXAMPLE TEXT
</small>
</p>
</th>
</tr>
<tr>
<td>
<!-- REMOVE THE BACKSLASHES -->
\```jsonc
{
  "foo": [
    {
      "bar": "hello world"
    }
  ]
}
\```
  
</td>
<td>
<!-- REMOVE THE BACKSLASHES -->
\```jsonc
{
  "foo": [
    {
      "bar": "hello world"
    }
  ]
}
\```
  
</td>
</tr>
<tr>
<td align="center">
Column 1
</td>
<td align="center">
Column 2
</td>
</tr>
</table>
@Xunnamius
Copy link
Copy Markdown

Clever. Thanks :)

@sanghee-dev
Copy link
Copy Markdown

awesome!

@maximilianMairinger
Copy link
Copy Markdown

<3

@panoply
Copy link
Copy Markdown
Author

panoply commented Aug 12, 2022

Update, you can now define width on <th> Example:

API CLI
{
  "input": "source",
  "output": "theme",
  "import": "import",
  "export": "export",
  "config": "."
}
--input  -i <dir>
--output -o <dir>
--config -c <dir>

Code

<!-- prettier-ignore -->
<table>
  <thead>
    <tr>
      <th width="500px"> API</th>
      <th width="500px">CLI</th>
    </tr>
  </thead>
  <tbody>
  <tr width="600px">
      <td>


</td>
<td>


</td>
</tr>

  </tbody>
</table>

@Xunnamius
Copy link
Copy Markdown

Thanks for the update!

@gensart-x
Copy link
Copy Markdown

Thanks for sharing, it helped my README to be more good. ๐Ÿ’–

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