'Left-align headers in Markdown table?
Using the table example from "Markdown Cheatsheet" on GitHub, you get this:
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
My question is, is there any way to left-align the header cells?
Solution 1:[1]
Markdown:
| Tables | Are | Cool |
|:------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| col 1 is | left-aligned | $42 |
| zebra stripes | are neat | $1 |
Result:
| Tables | Are | Cool |
|---|---|---|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| col 1 is | left-aligned | $42 |
| zebra stripes | are neat | $1 |
Note that the colon (":") on the second row, and the second character is what worked to The other option is to move the numbers to the left-most column (as below)
Amount | Items
------:|:-----
20 | Wooden Boards
5 | Old Parts
Try it on StackEdit.
It does not seem to work putting the ---- line above the headers.
Solution 2:[2]
On the second line, I would change to this to align everything (headers and content) to the left:
| :------------ | :-------------- | :----- |
Notice the colons on the left of each column.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Dai |
| Solution 2 | konyak |

