Blog

Something coding related, I guess.

How to Insert a Table to a Markdown File

Last edit: 13:35:45 2/24/2019

I have inserted a lot of tables recently in Markdown, so I might as well write an article about how to do that.


Everything is easy in Markdown, including adding a table. To create a table, all you need is these three characters:

"-", "|", ":".

Let’s create a table of the test results of some students with these lines.

| Name | Number | Score | Rank |
| :---- | ----: | :----: | ---- |
Jack Dawson | 1 | 23 | 4
Rose Tyler | 2 | 89 | 2
| Li Lei | 3 | 59 | 3 |
Han Meimei | 4 | 93 | 1

Result:

Name Number Score Rank
Jack Dawson 1 23 4
Rose Tyler 2 89 2
Li Lei 3 59 3
Han Meimei 4 93 1

These lines below are basically self-explanatory. But here are some points you should be aware of:


⇦ Previous: A Journey to macOS

⇨ Next: Finding Divisors - Algorithm Simplification

🏡 Back to Home Page