Markdown guides
Direct answers to the markdown syntax questions everyone hits — each with copyable examples, rendered output, and the renderer-compatibility gotchas (GitHub, Discord, Slack, and friends).
How to center text in markdown →
Markdown has no centering syntax. Use <div align="center"> or <p align="center"> where HTML is allowed, like GitHub READMEs. Center images, headings.
How to make a checkbox in markdown →
Create checkboxes in markdown with - [ ] for unchecked and - [x] for checked. Task list syntax for GitHub, GitLab, Obsidian, Discord, nesting and gotchas.
How to write a code block in markdown →
Make code blocks with triple-backtick fences and a language tag for syntax highlighting. Inline code, escaping backticks, nested fences, diff highlighting.
How to write a comment in markdown →
Markdown has no comment syntax, but HTML comments <!-- like this --> stay hidden in rendered output. Where they leak, and truly invisible alternatives.
How to add an image in markdown →
Embed images in markdown with . Local paths vs URLs, image links, sizing with HTML width attributes, captions, and GitHub-specific tips.
How to indent in markdown →
Indentation in markdown is syntax, not styling: 2 spaces nests lists, 4 spaces makes a code block. Indent paragraphs, continue list items, avoid tabs.
How to make a link in markdown →
Create markdown hyperlinks with [text](url). Titles, reference-style links, linking to headings within a page, bare URLs, and opening in a new tab.
How to make a new line in markdown →
Single newlines collapse in markdown. Force a line break with two trailing spaces or a backslash, or leave a blank line for a new paragraph. Renderer tips.
Markdown blockquote: how to quote text →
Markdown blockquote syntax: start a line with > to quote text. Multi-line, nested and attributed quotes, GitHub [!NOTE] alerts, Obsidian callouts, fixes.
How to strikethrough text in markdown →
Cross out text in markdown by wrapping it in double tildes, like ~~this~~. Where it works (GitHub, Discord, Slack), single vs double tilde, HTML fallbacks.
How to underline text in markdown →
Markdown has no underline syntax; underscores make italics. Use HTML <u> or <ins> tags where allowed, and see what works on GitHub, Discord, and Slack.
Prefer everything on one page? See the complete markdown cheat sheet, or put the syntax to work in the free markdown tools.