Reference library

Markdown syntax and examples

Headings, emphasis, lists, links, code, tables, and task lists with rendered examples.

Cheat sheet

Markdown syntax and result

Click any syntax example to copy it. GFM marks syntax that depends on GitHub-style extensions.

Markdown syntax with rendered examples and usage notes
Syntax Result When to use
Document structureHeadings, paragraphs, breaks, and semantic blocks. 5

Section

Heading One to six # characters set the heading level. CommonMark

First paragraph.

Second paragraph.

New paragraph A blank line separates two paragraphs. CommonMark
First line
Second line
Hard line break Two trailing spaces create a line break without a new paragraph. CommonMark Mind the spaces

Thematic break Separates one thematic section from another. CommonMark
An important thought
Block quote A > at the start of the line creates a quotation or note. CommonMark
Inline formattingEmphasis, code, and escaping special characters. 6
important text
Bold text Double asterisks create strong emphasis. CommonMark
emphasis
Italic text One asterisk on each side creates regular emphasis. CommonMark
strong emphasis
Bold italic Three asterisks combine both emphasis styles. CommonMark
outdated
Strikethrough Marks removed or no longer relevant text. GFM
npm run build
Inline code Backticks mark a command, filename, or short piece of code. CommonMark
*not italic*
Backslash escape A backslash displays a punctuation marker as literal text. CommonMark
ListsBulleted, ordered, nested, and task lists. 4
  • First item
  • Second item
Bulleted list A hyphen and space at the start of each line create list items. CommonMark
  1. First step
  2. Second step
Ordered list A number, period, and space create a sequence of steps. CommonMark
  • Section
    • Subitem
Nested list Indenting the marker moves an item to the next level. CommonMark
  • Done
  • In progress
Task list Square brackets add checked and unchecked tasks. GFM
Link Put link text in square brackets and the destination in parentheses. CommonMark
Autolink Angle brackets turn a full URL into a link without a separate label. CommonMark
IMG · Description
Image An exclamation mark before link syntax embeds an image. CommonMark
Reference link A definition elsewhere in the document lets you reuse one destination. CommonMark
Code and dataMultiline code, tables, and hidden comments. 3
const ready = true;
Fenced code block Three backticks preserve formatting; a language tag enables highlighting when supported. CommonMark
NameStatus
AnnaDone
Table Pipes define columns, and the hyphen row separates the header. GFM
Not shown on the page
Hidden comment An HTML comment remains in the source but is hidden from the rendered document. CommonMark Mind the spaces
Quick notes

Write portable Markdown

Separate blocks
Leave a blank line between paragraphs, lists, and code blocks.
Escape markers
Add a backslash before *, #, or another punctuation mark when it should stay literal.
Check the renderer
Tables, task lists, and strikethrough belong to GFM and may not work everywhere.
Keep the source readable
Use meaningful link labels and add a language after fenced code markers.
Related tools

Continue working with text

Copy a symbol, convert markup, clean a fragment, or keep the result in the notebook.

FAQ

Questions about Markdown

What is the difference between Markdown and GFM?

CommonMark standardizes the core Markdown syntax. GitHub Flavored Markdown builds on it with extensions such as tables, task lists, strikethrough, and extended autolinking.

Why does the same Markdown render differently?

Editors and websites may use different parsers and extension sets. Core syntax is the most portable; check the target platform before relying on an extension.

How do I add a normal line break?

End the line with two spaces or a backslash in renderers that support the CommonMark form. Use a blank line when you need a new paragraph.

Can I copy a complete example?

Yes. Every syntax cell is a button that copies the exact Markdown source, including newlines and spaces.