Search code examples
htmlcssmarkdown

How to get rid of table borders in markdown?


This is my markdown code

| Time         | Length        | Speed              | Mass         |    
|--------------|---------------|--------------------|--------------|
| Millisecond  | Millimetre    | Kilometre per hour | Milligram    |   
| Second       | Centimetre    | Foot per second    | Gram         |  
| Minute       | Inch          | Miles per hour     | Ounce        |     
| Hour         | Foot          | Knot               | Pound        |  
| Day          | Yard          | Metre per second   | Kilogram     |  
| Week         | Metre         |                    | Us ton       |  
| Month        | Kilometre     |                    | Tonne        |  
| Year         | Mile          |                    | Imperial ton |  
| Decade       | Nautical mile |                    |              |  
| Century      |               |                    |              |  
| Millennium   |               |                    |              |  

Output:

Time Length Speed Mass
Millisecond Millimetre Kilometre per hour Milligram
Second Centimetre Foot per second Gram
Minute Inch Miles per hour Ounce
Hour Foot Knot Pound
Day Yard Metre per second Kilogram
Week Metre Us ton
Month Kilometre Tonne
Year Mile Imperial ton
Decade Nautical mile
Century
Millennium

I was wondering if it was possible to make it so that the table has no borders.


Solution

  • There's no mechanism in Markdown itself to hide table borders. You can override table CSS styles for generated HTML, but that will work only if you have access to CSS.

    For services like Github where CSS styles are predefined by service owner and cannot be overriden the table borders simply cannot be hidden.