Markdown Syntax Quick Reference: Inline, Block, Tables & Extended Syntax

Markdown 语法速查表:行内格式、块元素、表格、扩展语法一网打尽

"How do I write tables in Markdown again? How do I specify language for code blocks? How do I add footnotes? Is strikethrough one tilde or two?" — wasting time looking up syntax every time I write docs.

Bookmark this page — we've organized all Markdown syntax by category, each with syntax examples and rendered output descriptions. No more switching between search engines and documentation.

01 Inline Formatting

Inline formatting applies style markup to text within paragraphs. They don't create new block-level elements but directly style text where they appear.

Inline Formatting Quick Reference

EffectMarkdown SyntaxRendered Output
Bold**bold text**bold text
Italic*italic text*italic text
Bold Italic***bold italic***bold italic
Strikethrough~~deleted~~deleted
Inline Code`code`monospace code
Link[text](URL)clickable hyperlink
Image![alt](URL)embedded image
Highlight==highlighted==yellow background highlight

02 Block Elements

Block elements occupy one or more lines and form the main structure of a document. They are the skeleton of a Markdown document.

Block Elements Quick Reference

ElementMarkdown SyntaxDescription
Headings# through ######6 heading levels, more # = smaller
ParagraphText separated by blank linesBlank line starts new paragraph
Blockquote> quoted textNestable: >> for second level
Unordered List- Item oneAlso * or +, - is most common
Ordered List1. First itemNumbers can be non-sequential
Task List- [ ] todo / - [x] doneGFM extension, renders as checkbox
Horizontal Rule--- or *** or ___At least 3 chars, on its own line

03 Code

Inline code uses single backticks `code`, ideal for variable names, function names, and short commands. Code blocks use triple backtick fences with a language identifier for syntax highlighting.

Common language identifiers: javascript / js, typescript / ts, python / py, html, css, json, bash / shell, sql, java, c / cpp, go, rust, yaml, markdown / md.

If you don't know the language identifier, omit it (plain text mode). Indenting 4 spaces also creates code blocks (legacy syntax), but fenced code blocks are clearer and recommended.

Adding {1,3-5} after the language identifier enables line highlighting in some renderers (not standard Markdown, but supported by VitePress, Docusaurus, etc.).

04 Tables

Markdown tables use pipes | to separate columns, with --- in the second row separating headers from content. Alignment is controlled by colon placement.

Table Alignment Syntax

SyntaxAlignmentEffect
:---Left-alignedDefault alignment
:---:Center-alignedGood for titles, short data
---:Right-alignedGood for number columns

05 Extended Syntax

The following syntax belongs to extended Markdown (mainly from GitHub Flavored Markdown or other dialects), not universally supported but widely available in modern Markdown tools.

  • Footnotes: Use [^1] in text, then define [^1]: footnote content at the bottom. Renders as clickable footnote references.
  • Definition lists: Term on one line, : definition on the next. Supported by some renderers.
  • Abbreviations: *[HTML]: Hyper Text Markup Language. Hovering over HTML shows the full form.
  • Table of contents: Some tools support [TOC] markers for auto-generated TOC.
  • Math formulas: $E = mc^2$ (inline) and $$...$$ (block), rendered with KaTeX or MathJax.
  • Emoji: :smile: :rocket: :warning:, supported by GitHub and many Markdown editors as shortcodes.
  • Superscript/subscript: H~2~O (subscript), X^2^ (superscript), supported by some editors.

FAQ

How do I insert a line break (not a new paragraph) in Markdown?

Add two or more spaces at the end of the line, then press Enter. Or use the HTML <br> tag. A single Enter only produces a space, not a line break — this is Markdown's most confusing feature for beginners.

Can Markdown tables merge cells?

Native Markdown doesn't support cell merging. If you need merged cells, embed HTML <table> tags directly in Markdown using rowspan and colspan attributes.

What's the difference between CommonMark and GFM?

CommonMark is Markdown's standardization spec, defining precise behavior for core syntax. GFM (GitHub Flavored Markdown) is a CommonMark superset adding tables, task lists, strikethrough, autolinks, etc. Suried Editor is GFM-compatible.

How do I escape special characters in Markdown?

Add a backslash \ before special characters: \* shows an asterisk, \# shows a hash, \[ shows a bracket, etc. Characters that need escaping: \ ` * _ { } [ ] ( ) # + - . ! |

Does this cheat sheet apply to all Markdown editors?

Core syntax (headings, bold, lists, links, code) works in all Markdown editors. Extended syntax (footnotes, highlights, math formulas) support varies by editor. Suried Markdown Editor supports all syntax listed in this reference.

📖

Try the Tool Now

Bookmark this page — we've organized all Markdown syntax by category, each with syntax examples and rendered output descriptions. No more switching between search engines and documentation.

TOOLS.SURIED.COM