Markdown syntax and examples
Headings, emphasis, lists, links, code, tables, and task lists with rendered examples.
Markdown syntax and result
Click any syntax example to copy it. GFM marks syntax that depends on GitHub-style extensions.
| Syntax | Result | When to use | ||||
|---|---|---|---|---|---|---|
| Document structureHeadings, paragraphs, breaks, and semantic blocks. | ||||||
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. | ||||||
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 | |||||
| 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. | ||||||
| Bulleted list A hyphen and space at the start of each line create list items. CommonMark | |||||
| Ordered list A number, period, and space create a sequence of steps. CommonMark | |||||
| Nested list Indenting the marker moves an item to the next level. CommonMark | |||||
| Task list Square brackets add checked and unchecked tasks. GFM | |||||
| Links and imagesURLs, labels, images, and reusable definitions. | ||||||
| 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. | ||||||
| Fenced code block Three backticks preserve formatting; a language tag enables highlighting when supported. CommonMark | |||||
| 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 | |||||
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.
Syntax checked against the CommonMark 0.31.2 and the GitHub Flavored Markdown.
Convert Markdown to HTMLContinue working with text
Copy a symbol, convert markup, clean a fragment, or keep the result in the notebook.
- Encode HTML entities Turn special characters into safe HTML entities or decode them back.
- Convert Markdown to HTML Prepare HTML markup from a Markdown draft.
- Remove HTML tags Keep readable text and discard markup.
- Change text case Convert letters to upper or lower case.
- Open the online notebook Use copied symbols in a note stored locally in your browser.
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.