How to draw checkbox or tick mark in GitHub Markdown table?
Solution 1:
Try adding a -
before the []
or [x]
. That's an -
followed by a blank space .
Below is an example from Github blog.
### Solar System Exploration, 1950s – 1960s
- [ ] Mercury
- [x] Venus
- [x] Earth (Orbit/Moon)
- [x] Mars
- [ ] Jupiter
- [ ] Saturn
- [ ] Uranus
- [ ] Neptune
- [ ] Comet Haley
It appears like below:
Here's how one could do the same in a table:
| Task | Time required | Assigned to | Current Status | Finished |
|----------------|---------------|---------------|----------------|-----------|
| Calendar Cache | > 5 hours | | in progress | - [x] ok?
| Object Cache | > 5 hours | | in progress | [x] item1<br/>[ ] item2
| Object Cache | > 5 hours | | in progress | <ul><li>- [x] item1</li><li>- [ ] item2</li></ul>
| Object Cache | > 5 hours | | in progress | <ul><li>[x] item1</li><li>[ ] item2</li></ul>
- [x] works
- [x] works too
Here's how it looks:
Solution 2:
Now emojis are supported! :white_check_mark:
/ :heavy_check_mark:
gives a good impression and is widely supported:
Function | MySQL / MariaDB | PostgreSQL | SQLite
:------------ | :-------------| :-------------| :-------------
substr | :heavy_check_mark: | :white_check_mark: | :heavy_check_mark:
renders to (here on older chromium 65.0.3x) :
Solution 3:
I used ☐
(☐) for [ ]
and ☑
(☑) for [x]
and it works for marked.js which says it is compatible with Github markdown. I based my solution on answers for this question. See also this informative answer.
Update: I should have mentioned that when you do it this way, you do not need the <ul>
, e.g:
| Unchecked | Checked |
| --------- | ------- |
| ☐ | ☑ |
Solution 4:
You can use emojis
Done? | Name
:---:| ---
⬜️| Nope
✅| Yep