In this post, we will see how to create a checkbox or tick mark inside a markdown table for readme.md file on Github.

In markdown, we can create checkboxes like this.

Daily Task

- [X] Eat Breakfast
- [ ] Code

The output will be: the one with x mark is the checked one, and the other one is unchecked.

markdown checkbox

And, to create a table in markdown we use the pipe ( | ) to create the rows and triple dash (---) to create the separator for the header section.

Example:

| Task  | status  |
|---|---|
| eat breakfast  | Done  |

The output will be:

Taskstatus
eat breakfastDone

Now, we know how to create checkboxes and tables in markdown. So let's try to create checkboxes inside a markdown table in Github readme.md file.

Make a checkbox in Github

When we try to add the checkbox inside the markdown table in github.

| Task  | status  |
|---|---|
| eat breakfast  | - [X] Eat Breakfast  |

The result is not what we are expecting.

checkbox in markdown table in readme file

So, how can we add tick and cross marks in the markdown table in our github readme profile?

Well, we have different ways with which we can add checkboxes in Guthub. Let's see each of them with examples.

Using <ul> and <li> tag in markdown

We can use the <li> tag to create a markdown checkbox in Github like this

| Task  | status  |
|---|---|
| change code  | <ul><li>[x] Done</li><li>[ ] Pending</li></ul> |

Output:

add a checkbox in markdown using li in github

Using github supported Emoji

We can use emoji to create the tick and cross marks in your Github markdown table.

Code for tick mark is :heavy_check_mark:

Code for crossed mark is :x:

Example:

| Unchecked | Checked |
| --------- | ------- |
|  :x:  | :heavy_check_mark: |

Output:

git emoji to create checkbox

Get the list of github supported emojis.

Using Unicode to create tick emoji

Next, we can use Unicode to create checked and unchecked boxes in the markdown table.

Unicode for check box is &#9745; .

Unicode for an unchecked box is &#9744;

So we can put this code in the table to create the checkbox in readme.md file.

| Unchecked | Checked |
| --------- | ------- |
| &#9744;   | &#9745; |

Output:

unicode to create checkbox in markdown table

Using HTML entity code in markdown table

We can also use HTML entity code to create checked and crossed marks in the Github markdown table too.

Example:

| Unchecked | Checked |
| --------- | ------- |
| &cross;   | &check; |

Output:

checkbox in markdown github table

List of all HTML entity code.

Hope this post helps you create checkboxes in Github.


💾 Recommended Articles