Markdown 复选框工具
为 GitHub、GitLab 和其他平台创建 Markdown 任务列表和复选框。生成已选中和未选中的复选框,支持自定义文本。
Try the Markdown Checkbox Generator
Checkbox Settings
Output
Understanding Markdown Checkbox Syntax
Markdown checkboxes (also known as task lists) are a popular way to create interactive to-do lists in Markdown documents. They're widely supported in platforms like GitHub, GitLab, and many Markdown editors. Understanding the syntax will help you create effective task lists in your documentation and project management.
Basic Checkbox Syntax
The basic syntax for a Markdown checkbox consists of a list item (hyphen or asterisk) followed by square brackets with either a space (unchecked) or an 'x' (checked).
- [ ] Unchecked item
- [x] Checked itemWhen rendered in supported Markdown environments, these will display as interactive checkboxes that users can click to toggle the state.
Nested Checkboxes
You can create nested checkboxes by indenting the list items. This is useful for creating hierarchical task lists or sub-tasks.
- [ ] Main task
- [ ] Subtask 1
- [x] Subtask 2
- [x] Completed taskThe indentation is typically two spaces for each level of nesting. This creates a visual hierarchy in the rendered output.
Checkbox Compatibility
While checkbox syntax is part of GitHub Flavored Markdown (GFM), it's not part of the original Markdown specification. Support varies across different platforms:
Fully supported (interactive): GitHub, GitLab, Notion, VS Code with preview
Displayed but not interactive: Many Markdown editors, static site generators
Not supported: Basic Markdown parsers, some older platforms
If your target platform doesn't support checkboxes, they'll typically display as regular list items with the bracket notation visible.
Advanced Usage: Combining with Other Markdown
You can combine checkboxes with other Markdown formatting for more expressive task lists:
- [ ] **Important task** with bold text
- [x] Task with [a link](https://example.com)
- [ ] Task with `inline code`需要了解更多Markdown语法细节?我们的全面速查表涵盖了所有元素的详细说明:
探索完整 Markdown 语法Frequently Asked Questions
How do I create a checkbox in Markdown?
To create a checkbox in Markdown, use a hyphen followed by square brackets with either a space (unchecked) or an 'x' (checked):
- [ ] Unchecked item- [x] Checked itemThis syntax is supported in GitHub, GitLab, and many other Markdown environments.
Which platforms support Markdown checkboxes?
Markdown checkboxes are supported in:
- GitHub (issues, pull requests, wikis, README files)
- GitLab (issues, merge requests, wikis)
- Notion
- VS Code (with Markdown preview)
- Many Markdown editors like Typora, MarkText, and Obsidian
Some platforms display checkboxes but don't make them interactive, while others may not support them at all.
How do I create nested or indented checkboxes?
To create nested checkboxes, indent the child items with two spaces:
- [ ] Parent task
- [ ] Child task 1
- [ ] Child task 2
- [ ] Grandchild taskThis creates a visual hierarchy in the rendered output, making it clear which tasks are subtasks of others.
What if my Markdown platform doesn't support checkboxes?
If your platform doesn't support checkboxes, you have several alternatives:
- Use regular list items with symbols:
- ☐ Uncheckedand- ☑ Checked - Use HTML:
<input type="checkbox"> Task(if HTML is supported) - Use simple text indicators:
- [TODO] Taskand- [DONE] Task
Choose the approach that works best with your specific platform.
Can I automatically update checkboxes in Markdown?
On platforms like GitHub and GitLab, checkboxes in issues and pull requests can be clicked to toggle their state, which automatically updates the Markdown. For local Markdown files, you would typically need to edit the Markdown source manually or use a specialized Markdown editor with checkbox support. Some tools and scripts exist that can parse and update Markdown checkboxes programmatically, but this depends on your specific workflow and toolchain.
相关工具
使用双星号或双下划线在 Markdown 中创建粗体文本。学习为 GitHub、Discord 和文档进行正确的粗体格式化,带有实时预览。
使用星号或下划线在 Markdown 中创建斜体文本。学习在 GitHub、Discord 和其他平台中添加强调的不同方法。
使用 HTML 标签和 CSS 样式在 Markdown 中创建带下划线的文本。学习在 GitHub、Discord 和其他平台中添加下划线的不同方法。
为 GitHub、Discord 和其他平台创建 markdown 删除线文本。学习不同的 markdown 删除线方法,使用双波浪线格式化您的文本。
使用标准的 '>' 语法在 Markdown 中创建格式正确的引用块。支持嵌套引用和多行引用,并提供实时预览。
轻松创建和格式化 Markdown 列表。生成有序、无序和嵌套列表,支持正确的语法和自定义标记。