Markdown syntax
Every element of Markdown, one page each, with a live editor on all of them. Below they are grouped by what you are trying to write rather than alphabetically, because "how do I make a line break" is the shape the question usually arrives in.
If what you want is the whole thing on one screen to keep open while you write, that is the Markdown cheat sheet — same elements, one scannable table. This page is the longer form: each element gets its explanation, its edge cases, and the places it behaves differently.
Text and emphasis
Making words bold, italic, struck through, or marked in some way the plain letters do not carry.
- How to bold and italicise text in Markdown — Markdown bold
- How to strike through text in Markdown — Markdown strikethrough
- How to change text colour in Markdown — Markdown text color
- How to underline text in Markdown — Markdown underline
- How to write superscript and subscript in Markdown — Markdown superscript
- How to escape characters in Markdown — Markdown escape characters
Structure
The bones of a document: what is a heading, where a line ends, and how one section is set apart from the next.
- How to write headings in Markdown — Markdown headings
- Markdown line breaks and new lines — Markdown line break
- How to add a horizontal line in Markdown — Markdown horizontal line
- How to quote text in Markdown — Markdown quote
- How indentation works in Markdown — Markdown indent
- How to centre text in Markdown — Markdown center text
Lists and tables
The two elements people look up most often, and the two whose spacing rules trip everyone at least once.
- How to make numbered and bulleted lists in Markdown — Markdown numbered list
- How to make a table in Markdown — Markdown table
Links, images and code
Everything that points at something else, plus the syntax for text that must survive being read literally.
- How to add a hyperlink in Markdown — Markdown hyperlink
- How to add an image in Markdown — Markdown image
- How to write code blocks in Markdown — Markdown code block
- How to add a table of contents in Markdown — Markdown table of contents
- How to cite sources in Markdown — Markdown citation
The things Markdown has no syntax for
Every one of these is a real question with the same shape of answer: Markdown does not do it, here is the HTML that does, and here is what survives being pasted elsewhere.
- How to write a comment in Markdown — Markdown comment
- How to use HTML inside Markdown — HTML in Markdown
- How to write a definition list in Markdown — Markdown definition list
Which flavour of Markdown is this?
There is no single Markdown standard, which is the source of most of the confusion around it. What there is:
- CommonMark — the specification the core follows. Headings, emphasis, lists, links, images, code blocks and quotes behave the same in every renderer that implements it, which is nearly all of them.
- GitHub Flavored Markdown — CommonMark plus tables, task lists, strikethrough, footnotes and automatic linking. This is what most people mean when they say "Markdown" today, because it is what GitHub renders.
- Everything else — highlighting, callouts, maths, definition lists, wiki links. Each belongs to one tool: Obsidian, Pandoc, a static site generator. Useful where they work, and literal punctuation where they do not.
The editor on this site renders CommonMark and GitHub Flavored Markdown in full, plus highlighting and GitHub's alerts. Where a page recommends something outside that, it says so and says where it will and will not survive.
Common questions
- What is Markdown syntax?
- A small set of plain-text marks that a renderer turns into formatting: # for a heading, ** ** for bold, - for a list item, > for a quote. The file stays readable as text, which is the whole idea — you can open a Markdown file in any editor on any machine and still understand it.
- Is Markdown syntax the same everywhere?
- The core is. CommonMark specifies headings, emphasis, lists, links, images, code and quotes, and every renderer worth using follows it. Beyond that they differ: tables, task lists, strikethrough and footnotes come from GitHub Flavored Markdown, and things like highlighting or callouts are one implementation's extension. Each page here says which is which.
- What is the difference between this and the cheat sheet?
- The cheat sheet is one page with every element's markup in a single table, to keep open while you write. This is the index: one page per element, each with an explanation, the edge cases, and a live editor to try it in. Use the cheat sheet to remember, use these to understand.
- Do I need to learn all of it?
- No. Headings, bold, italic, links and lists cover almost everything most people ever write. The rest is worth knowing exists so you can look it up on the day you need a table or a footnote.
- Where can I try the syntax out?
- Every page here has a live editor with that element already in it — edit the example and watch the rendered version change. Nothing you type is uploaded; the whole site runs in your browser.