← All articles
Writing & Text

Markdown Checkboxes and Task Lists: Syntax and Examples

Markdown Checkboxes and Task Lists: Syntax and Examples

To make a checkbox in Markdown, start a list item with a dash, a space and square brackets: - [ ] for an empty box and - [x] for a ticked one. This is called a task list. It is part of GitHub Flavored Markdown (GFM), so it works on GitHub, GitLab, Obsidian, VS Code’s preview and most modern editors, but not in strict standard Markdown.

Task List Syntax

- [ ] Draft the blog post
- [x] Send the invoice
- [ ] Review the budget

Three things must be exactly right:

  1. A list marker: -, *, + or a number such as 1.
  2. A space after the marker.
  3. Square brackets with a space inside for empty, or x (lowercase or capital) for done, then another space before the text.

What HTML Does a Task List Produce?

A GFM converter turns each item into a list item holding a checkbox input. The Markdown to HTML converter produces this from the example above:

<ul>
<li><input disabled="" type="checkbox"> Draft the blog post</li>
<li><input checked="" disabled="" type="checkbox"> Send the invoice</li>
<li><input disabled="" type="checkbox"> Review the budget</li>
</ul>

The boxes are disabled, so readers can’t tick them on a web page. That is normal: Markdown describes the state when it was written. Apps such as GitHub and Obsidian add their own code to make boxes clickable.

Common Mistakes (and Fixes)

You typed What happens Fix
-[ ] task Shows as plain text Add a space after the dash
- [] task Shows literal brackets Put a space inside: [ ]
- [x]task Often not recognised Add a space after the brackets
[ ] task Plain text Task lists must be list items: start with -
- [v] task Plain text Only x or X counts as ticked

Nested and Numbered Task Lists

Indent sub-tasks by two to four spaces under the parent item:

- [ ] Launch the website
  - [x] Buy the domain
  - [ ] Write the About page
  - [ ] Test on a phone
1. [x] Numbered tasks work too
2. [ ] Second step

Keep the indentation consistent. Mixing tabs and spaces is the usual reason a nested item breaks out of its parent.

Where Do Markdown Checkboxes Work?

App Shows boxes? Clickable?
GitHub issues, pull requests, comments Yes Yes, and the issue shows a progress count
GitHub README files Yes No, edit the file to change them
GitLab Yes Yes in issues and merge requests
Obsidian Yes Yes
VS Code Markdown preview Yes No
Strict CommonMark tools No, shows [ ] as text No

If your platform shows the brackets as text, it isn’t using GFM. Look for a “GitHub Flavored Markdown” or “extensions” setting, or convert the list to HTML first.

How to Show Square Brackets Without a Checkbox

Put a backslash before the first bracket: - \[ ] not a task. The converter then prints the brackets as ordinary text.

Practical Uses

  • Project READMEs: a roadmap with done and pending features.
  • Pull request checklists: “tests added”, “docs updated”, “screenshots attached”.
  • Personal notes: a weekly to-do list in Obsidian or any notes app.
  • Emails and web pages: write the list in Markdown, convert it to HTML and paste the result.

For a list you’ll print or tick off daily, a planner may suit you better. The free Daily Planner saves your tasks in the browser and prints them as a page.

Frequently Asked Questions

Is a Markdown checkbox the same as a task list?

Yes. “Task list” is the official GitHub Flavored Markdown name; people search for it as “Markdown checkbox”. Both mean - [ ] and - [x] items.

Can I use a capital X to tick a box?

Yes. The GFM specification accepts both [x] and [X].

Why can’t I click the checkbox on my web page?

Converters output disabled checkboxes, because Markdown is a static document. To make boxes clickable you need a little JavaScript, or an app such as GitHub or Obsidian that adds it for you.

Do task lists work in standard Markdown?

No. They are a GFM extension. Standard CommonMark shows the brackets as text, so use a GFM-compatible editor or converter.

Leave a Reply

Your email address will not be published. Required fields are marked *