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

What does "Export as Markdown" or "Copy as Markdown" mean? →

Export as Markdown saves a document as plain text (.md) with its formatting written as Markdown symbols. Where it appears and what to do with the file.

How to make alerts and callouts in markdown →

GitHub alerts use > [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], [!CAUTION] on a blockquote. What each means, plus the GitLab, Obsidian and Docusaurus forms.

How to link to a heading in markdown →

Link to a heading in markdown with [text](#heading-slug). GitHub slug rules, the <a id> fallback, cross-file anchors, and where anchors differ.

How to make text bold or italic in markdown →

Bold is **text** or __text__, italic is *text* or _text_, bold italic is ***text***. Nesting, the mid-word underscore trap and per-app differences.

Markdown bullet points: how to make a bullet list →

Markdown bullet points: start a line with -, * or + and a space. Nested bullets, tight vs loose lists, bullets in quotes and tables, and why a list fails.

How to center text in markdown →

Markdown has no centering syntax. Use <div align="center"> or <p align="center"> on GitHub, center images and headings, :---: columns, and where it fails.

How to make a checkbox in markdown →

Create checkboxes in markdown with - [ ] for unchecked and - [x] for checked. Task lists on GitHub, GitLab, Obsidian, Notion, Jira and MDX, plus nesting.

How to write a code block in markdown →

Make a code block with three backticks and a language tag for highlighting. Inline code, backticks inside code, diff and mermaid fences, where they render.

Markdown collapsible section: how to hide and expand text →

Markdown collapsible section: wrap content in <details><summary> for an expandable block on GitHub and GitLab. Open by default, nesting, Obsidian, Notion.

Markdown color text: how to change the color of text →

Markdown has no color syntax. Use <span style> where HTML is allowed, the math color trick or diff blocks on GitHub, Discord ANSI blocks, Obsidian, Notion.

How to write a comment in markdown →

Markdown has no comment syntax, but HTML comments <!-- like this --> stay hidden on GitHub, GitLab and Obsidian. Where they leak, plus Obsidian and MDX.

How to make a definition list in markdown →

Definition list syntax (term, then : definition on the next line) in Markdown Extra, Pandoc, kramdown and GitLab. GitHub has none: use bold terms or <dl>.

How to embed a video in markdown →

Embed a video in markdown: a thumbnail link works everywhere, uploaded MP4/MOV URLs play inline on GitHub, iframes are stripped, apps have own embeds.

How to add emoji in markdown →

Add emoji in markdown by typing :shortcode: (GitHub, GitLab, Slack, Discord) or pasting the Unicode character, which works everywhere. Support matrix.

Markdown escape characters: how to show * _ # and | literally →

Markdown escape characters: put a backslash before a symbol to show it literally. Full CommonMark escape list, pipes in tables, backticks, < and >.

Markdown footnotes: how to add a footnote →

Markdown footnote syntax: [^1] in the text and [^1]: note at the bottom. Inline ^[note] footnotes, multi-paragraph notes, numbering and app support.

How to make headings in markdown →

Make a heading with # for H1 through ###### for H6, a space after the hashes. Anchor links, custom IDs, the one-H1 rule, setext underlines, pitfalls.

How to highlight text in markdown →

Highlight text in markdown with ==text== in Obsidian, Typora and Pandoc, or with <mark>text</mark> on GitHub and GitLab. No highlight in Slack or Discord.

Markdown horizontal rule: how to add a divider line →

Markdown horizontal rule syntax: three or more hyphens, asterisks or underscores on a line of their own. The --- heading and front matter pitfall, styling.

How to add an image in markdown →

Add an image in markdown with ![alt text](url). Local paths, resizing with <img width>, clickable images, captions, dark-mode logos and alt text rules.

How to indent in markdown →

Indentation in markdown is syntax: 2 spaces nests a bullet, 3 nests under 1., 4 spaces makes a code block. Paragraph indents, continuation lines, tabs.

Markdown links: how to add a hyperlink in markdown →

Markdown link syntax: [text](url) makes a hyperlink. Reference-style links, autolinks, relative links, links to headings, image links, titles and escaping.

Markdown math: how to write equations with $ and $$ →

Markdown math syntax: $x^2$ for inline and $ blocks for display equations, plus GitHub math fences. Support in GitHub, GitLab, Obsidian, Typora, Jupyter.

How to nest lists in markdown →

Nest a markdown list by indenting the child to where the parent text starts: 2 spaces under -, 3 under 1., 4 under 10. CommonMark rule and mixed lists.

How to make a new line in markdown →

A single Enter collapses in markdown. Force a line break with two trailing spaces, a backslash or <br>; a blank line starts a paragraph. Per-app rules.

How to make a numbered list in markdown →

Make a numbered list in markdown with 1. 2. 3. or just 1. 1. 1. — renderers auto-number. Start at any number, continue after a paragraph, nested numbering.

Markdown page break: how to start a new page in PDF and Word →

Markdown has no page break syntax. Use <div style="page-break-after: always"> for HTML and PDF export, \newpage in Pandoc, or editor options.

Markdown blockquote: how to quote text in markdown →

Markdown blockquote syntax: start a line with > to quote text. Multi-line, nested and cited quotes, author attribution, code in quotes, Discord and Slack.

How to strikethrough text in markdown →

Cross out text in markdown with double tildes, ~~like this~~. Single vs double tilde, Slack and Notion single-tilde forms, <del> vs <s>, per-app table.

Markdown subscript: how to write text below the line →

Markdown subscript syntax: <sub>text</sub> on GitHub, ~text~ in Pandoc and Typora, Unicode H₂O in chat apps. Why ~ clashes with strikethrough; a table.

Markdown superscript: how to write text above the line →

Markdown superscript syntax: ^text^ in Pandoc and Typora, <sup>text</sup> on GitHub and GitLab, Unicode ² characters in chat apps. Support table and fixes.

How to make a table in markdown →

Markdown table syntax: pipes for columns, a hyphen row under the header, colons for alignment. Escaping |, line breaks with <br>, empty cells, no colspan.

How to add a line break in a markdown table cell →

Put multiple lines in a markdown table cell with <br>. Two-space and backslash breaks do not work in tables. Escaped pipes, bullets in cells, HTML tables.

How to underline text in markdown →

Markdown has no underline syntax; underscores make italics. Use <ins> on GitHub (it strips <u>), __text__ on Discord, Ctrl+U in Notion and Jira.

Prefer everything on one page? See the complete markdown cheat sheet, or put the syntax to work in the free markdown tools.