Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to draw checkbox or tick mark in GitHub Markdown table?

I am able to draw checkbox in Github README.md lists using

- [ ] (for unchecked checkbox) - [x] (for checked checkbox) 

But this is not working in table. Does anybody know how to implement checkbox or checkmark in GitHub Markdown table?

like image 611
Gaurav Bishnoi Avatar asked Nov 17 '17 06:11

Gaurav Bishnoi


People also ask

How do I tick a checkbox in Markdown?

In Markdown applications that support task lists, checkboxes will be displayed next to the content. To create a task list, add dashes ( - ) and brackets with a space ( [ ] ) in front of task list items. To select a checkbox, add an x in between the brackets ( [x] ).

How do I create a checklist in GitHub?

Creating task lists To create a task list, preface list items with a hyphen and space followed by [ ] . To mark a task as complete, use [x] . Tip: You cannot create task list items within closed issues or issues with linked pull requests.

How do you create a table of contents in Markdown?

Press CTRL + SHIFT + P. Select Markdown: Create Table of Contents.


Video Answer


2 Answers

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:

Resultant Image

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:

enter image description here

like image 80
Yash Avatar answered Sep 21 '22 17:09

Yash


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) :

enter image description here

like image 25
davidkonrad Avatar answered Sep 22 '22 17:09

davidkonrad