Create a table or columns in github flavored markdown without borders

3k Views Asked by At

Is there a way to create columns or a table in Github Flavored Markdown without borders ?

I have tried using html table and it works but I cannot get rid of the borders. Based on this thread in github community using CSS is not possible as HTML gets heavily sanitized by github and stripped of any styles and thus does not get applied - https://github.community/t/github-flavored-markdown-doesnt-render-css-styles-inside-a-html-block/126258.

<table border="0">
<tr>
<td>baz</td>
<td>bim</td>
</tr>
</table

I also tried the following markdown syntax

| Column 1 Header | Column 2 Header | Column 3 Header |
| --------------- | --------------- | --------------- |
| Row 1 Column 1 | Row 1 Column 2 | Row 1 Column 3 |
| Row 2 Column 1 | Row 2 Column 2 | Row 2 Column 3 |
| Row 3 Column 1 | Row 3 Column 2 | Row 3 Column 3 |

And I am running into same issue - that I cannot get rid of the table borders.

Does anyone know a solution to this ?

1

There are 1 best solutions below

0
On BEST ANSWER

As Chris mentioned, this isn't possible. GitHub strips CSS and many HTML attributes for security and to provide a consistent experience. In addition, letting people style things in custom ways in the UI has the potential to create accessibility problems and cause rendering issues if and when GitHub changes the style.

What looks fine to you right now might be hard to read or distinguish for someone with certain vision problems or on certain types of screens, and it might be hard to read if GitHub ever adds a dark mode. So on the whole, there aren't going to be a lot of ways to customize the rendering of Markdown or other text formats on GitHub. If you need that, you should host your own website with the data rendered as you'd like it.