Markdown task lists
A Markdown checkbox is a list item that starts with [ ] for an open task or [x] for a finished one. Task lists are an extension in GitHub Flavored Markdown (GFM), not part of CommonMark, so they render as checkboxes in GitHub and most current editors, and as plain brackets in tools that follow CommonMark only.
- [x] Book the room
- [ ] Send the agenda
- [ ] Share notes after the meeting
What are the exact rules for a task list item?
The GFM spec defines a task list item marker as a left bracket, either a space or the letter x in lowercase or uppercase, and a right bracket, followed by whitespace before the task text. The marker must open the first paragraph of a list item.
- [ ] Task,- [x] Taskand- [X] Taskall work.- [] Taskhas no space between the brackets, so it shows a literal[].- [ ]Taskhas no space after the bracket, so it is not a checkbox either.[ ]in the middle of a line, or at the start of a paragraph outside a list, stays text.- Any list marker works, including numbers:
1. [ ] First step.
GitHub's documentation adds one case: if the task text starts with a parenthesis, escape it, as in - [ ] \(Optional) Follow up, so it is not read as part of a link.
How do you nest tasks?
Indent subtasks under a parent the same way as any nested list: two spaces under a - bullet.
- [ ] Launch checklist
- [x] Write release notes
- [ ] Update screenshots
- [ ] Publish the post
The parent box is not ticked automatically when every subtask is done. Each checkbox is its own piece of text in the file, so you tick the parent yourself.
Can you mix tasks and normal list items?
Yes. Each list item decides for itself whether it is a task, so a list can hold some checkboxes and some plain bullets. This is useful for a note or a link under a task:
- [ ] Renew the domain
- Registrar login is in the shared vault
- [x] Update the invoice address
Are Markdown checkboxes clickable?
That depends on the app. The GFM spec only says a checkbox is rendered, as <input type="checkbox"> in HTML, and leaves interaction to the app. Its reference output marks the boxes as disabled, so a plain HTML page made from Markdown shows read-only boxes.
On GitHub, people who can edit an issue or pull request description can tick its boxes, and GitHub rewrites [ ] to [x] in the text. Markdown editors that support task lists usually let you click a box to toggle it in the file.
How do you find open tasks across notes?
Because a task is plain text, any text search finds it. Search for - [ ] to list every open task, or - [x] for finished ones, in a single file or across a folder of notes.
Task lists in Noteline
Noteline shows task items as checkboxes as you type, and clicking a box switches [ ] and [x] in the file. Cmd+Shift+9 on a Mac (Ctrl+Shift+9 on Windows and Linux) turns the current line into a task, and pressing Enter after a task starts a new open task. Searching all notes for - [ ] with Cmd+Shift+F (Ctrl+Shift+F) lists the notes that still have open tasks.
Common questions
Why does my checkbox show as [ ] text?
The renderer may follow CommonMark only, the brackets may be missing their inner space, or the line may not be a list item. Check that the line starts with - [ ] including both spaces.
Can I use an uppercase X?
Yes. The GFM spec accepts [x] and [X], and both render as a ticked box.
Is a finished task crossed out?
Markdown only stores whether the box is ticked. Crossing out or dimming finished tasks is a display choice each app makes.