Github checkbox - Create checkbox inside markdown table in github

📋 Table Of Content
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.
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:
Task | status |
---|---|
eat breakfast | Done |
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.
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.
<ul>
and <li>
tag in markdown
Using 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:
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:
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 ☑
.
Unicode for an unchecked box is ☐
So we can put this code in the table to create the checkbox in readme.md
file.
| Unchecked | Checked |
| --------- | ------- |
| ☐ | ☑ |
Output:
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 |
| --------- | ------- |
| ✗ | ✓ |
Output:
List of all HTML entity code.
Hope this post helps you create checkboxes in Github.