Markdown Cheat Sheet: Syntax, Examples & Tips

By the InfiniSynapse Editorial Team · Last updated: 2026-07-31 · This Markdown cheat sheet organizes the syntax writers use most into copy-ready examples, compatibility notes, error checks, and a practical document-conversion workflow.
Markdown cheat sheet workflow showing plain syntax transformed into headings, tasks, tables, links, images, and code
Quick answerMarkdown is a plain-text formatting syntax. Use # for headings, ** for bold text, - for lists, [text](URL) for links, ![alt](path) for images, and backticks for code. Tables, task lists, and strikethrough usually require GitHub Flavored Markdown or another compatible extension.

Markdown syntax quick reference

The practical core of Markdown is small enough to scan in a minute. The table below separates broadly portable syntax from common extensions, because “valid Markdown” does not always mean “identical output.” CommonMark defines a consistent baseline for parsers, while platforms such as GitHub add useful authoring features. When a document must move between systems, test the exact renderer rather than assuming every extension will survive.

ElementWrite thisUse and compatibility
Heading# Title
## Section
One to six hash marks; add a space after them.
Bold / italic**bold**
*italic*
Core syntax; keep punctuation outside markers when possible.
Unordered list- ItemCore syntax; indent nested items consistently.
Ordered list1. FirstCore syntax; many renderers calculate numbering.
Link[label](https://example.com)Use descriptive link text rather than “click here.”
Image![alt text](image.png)Alt text describes the image when it cannot be seen.
Inline code`npm run build`Core syntax; backticks preserve code-like text.
Code block```js … ```Fenced blocks are widely supported; the language label is optional.
Blockquote> Quoted textCore syntax; repeat the marker for multiple paragraphs.
Table| A | B |GFM extension; not part of the portable core.
Task list- [ ] To doGFM extension; interaction varies by platform.
Strikethrough~~removed~~GFM extension; verify before conversion.
Horizontal rule---Core syntax; surround it with blank lines.
Escape character\*Prevents a punctuation character from becoming formatting.

Headings, paragraphs, emphasis, and line breaks

Start a heading with one to six # characters followed by a space. Use one level-one heading for the document title, level two for major sections, and deeper levels only when the content genuinely has another layer. A readable outline is more useful than choosing a heading level for its visual size. Styling belongs to the renderer; structure belongs in the Markdown.

# Deployment runbook
## Before deployment
### Verify the release

This is a paragraph with **important text**, *emphasis*,
and `an inline command`.

A blank line creates a new paragraph. A single newline may be treated as ordinary whitespace, depending on the renderer. If you need a deliberate hard line break, CommonMark supports two trailing spaces or a backslash at the end of the line. The backslash is easier to notice during review, but some teams prefer wrapping prose naturally and avoiding forced breaks altogether.

Common mistake: do not write #Heading without a space. Also avoid using bold text as a substitute for a heading: it looks prominent but does not create a navigable document outline.

Lists, checklists, and blockquotes

Use hyphens, asterisks, or plus signs for unordered lists and numbers followed by periods for ordered lists. Pick one unordered marker and stay consistent. Nested content requires indentation; four spaces is a safe choice when a list item contains another list, a paragraph, or a code block. Keep a blank line before a list if the preceding paragraph might otherwise run into it.

Nested list
- Prepare
    - Back up data
    - Notify owners
- Deploy
- Verify
Task list (GFM)
- [x] Draft content
- [x] Review links
- [ ] Test conversion
- [ ] Publish

Task lists are excellent for issues, pull requests, and lightweight plans, but the checkbox may be interactive on one platform and static on another. Blockquotes begin with >. Use them for quoted material or short callouts, not as a universal layout container. For a multi-paragraph quote, prefix the blank quote line and each paragraph with the marker so the structure remains unambiguous.

An inline link combines a label in square brackets with a destination in parentheses. The label should explain what the reader will find. Reference-style links are useful in long documents because they move lengthy destinations away from the sentence and let several references share one definition.

Read the [CommonMark specification](https://spec.commonmark.org/).

See the [release checklist][release].

[release]: https://example.com/release-checklist "Release checklist"

Images use the same pattern with a leading exclamation mark. The words inside square brackets are alternative text, not a caption. Describe the image’s purpose concisely; do not repeat nearby text or begin with “image of.” A relative path such as images/diagram.png is usually easier to move with a repository, while an absolute URL depends on the remote asset remaining available.

![System flow from source data to validated report](images/system-flow.png)

[![Dashboard preview](images/dashboard.png)](https://example.com/dashboard)

URLs containing spaces or parentheses can confuse parsers. Prefer clean URLs, percent-encode spaces, or use a reference link. After moving a file, verify relative image and link paths from the document’s new location. Broken assets are one of the most common failures in otherwise correct Markdown.

Inline code and fenced code blocks

Wrap a command, file name, field, or short expression in one backtick. For a longer sample, use a fenced code block with three backticks on separate lines. Add a language identifier—such as js, python, sql, or json—when the renderer supports syntax highlighting. The identifier helps both readers and tooling understand what the sample contains.

```sql
SELECT customer_id, COUNT(*) AS orders
FROM orders
GROUP BY customer_id
ORDER BY orders DESC;
```

Do not put explanatory prose inside the fence unless it belongs to the code. Introduce the sample before it and explain the result afterward. If the code itself contains triple backticks, wrap the outer block with four backticks. Code blocks inside list items need consistent indentation and usually a blank line before the fence.

How to create a Markdown table

A Markdown table has a header row, a delimiter row, and data rows. Vertical bars separate columns. Colons in the delimiter row control left, center, or right alignment in renderers that support it. The outer bars are often optional, but including them makes the raw table easier to scan.

| Status | Owner | Time saved |
|:-------|:-----:|-----------:|
| Ready  | Ana   | 4 hours    |
| Review | Dev   | 2 hours    |

Tables are useful for compact comparisons, not long prose. They become difficult to read on phones when cells contain paragraphs or many columns. If a table exceeds four or five columns, consider splitting it or using a list. A literal vertical bar inside a cell usually needs escaping as \|. Because tables are an extension rather than core CommonMark, test the destination application before relying on them.

CommonMark versus GitHub Flavored Markdown

Markdown is a family of implementations rather than a single identical renderer. The CommonMark specification provides a precise, testable interpretation of the core language. GitHub Flavored Markdown, commonly shortened to GFM, extends CommonMark with tables, task list items, strikethrough, and autolinks. GitHub also documents its platform-specific behavior in its writing and formatting guide.

The safest workflow is to write the portable core for content that must travel widely, then use extensions only when they produce meaningful value. A README hosted on GitHub can reasonably use task lists and tables. A document that will pass through several converters should use simpler structures unless those converters are known to support the same extension set.

Markdown formatting errors and how to fix them

SymptomLikely causeFix
Heading appears as plain textNo space after #Write ## Section, not ##Section.
List merges into a paragraphMissing blank line or inconsistent indentationAdd a blank line and align markers.
Code fence never closesOpening and closing fence differUse matching backtick fences on their own lines.
Image does not loadWrong relative path or filename caseResolve the path from the Markdown file and match case.
Table columns breakMissing delimiter cells or unescaped barMatch column counts and escape literal bars.
Checkbox is plain textRenderer does not support task listsUse a GFM-compatible renderer or a regular list.

When output differs between tools, reduce the example to the smallest block that still fails. Check blank lines, indentation, punctuation, and extension support in that order. This is faster than changing several pieces at once. Keep a representative test document containing a heading, nested list, link, image, table, and code block if Markdown is part of a recurring publishing workflow.

A reliable Markdown writing and conversion workflow

1Write for structure

Use one clear title, descriptive section headings, short paragraphs, and portable syntax.

2Preview the target

Check the actual renderer, especially tables, tasks, nested lists, images, and code highlighting.

3Convert and inspect

Open the exported file and review pagination, links, alt text, tables, and code blocks.

Keep the source file and its local assets together, use meaningful filenames, and avoid embedding secrets or private URLs. Before conversion, remove unsupported HTML and confirm that headings form a sensible outline. After conversion, do not assume that a successful download means a faithful result: inspect page breaks, font substitutions, clipped tables, clickable links, and image resolution.

Turn your Markdown cheat sheet into a shareable file

Once the syntax previews correctly, use the InfiniSynapse Markdown to PDF tool to render headings, tables, code blocks, and links into a downloadable PDF. The tool processes the content in the browser; still remove confidential information before using any conversion workflow.

Open Markdown to PDF Converter →

Markdown cheat sheet FAQ

What is the basic Markdown syntax?

Use hash marks for headings, asterisks or underscores for emphasis, hyphens or numbers for lists, brackets and parentheses for links, a greater-than sign for blockquotes, and backticks for code. Those elements cover most everyday documents.

How do I make a line break in Markdown?

Start a new paragraph with a blank line. For a hard line break inside a paragraph, CommonMark supports two spaces or a backslash at the end of the line. Renderer settings may also preserve ordinary newlines.

How do I create a Markdown table?

Write a header row, a delimiter row made of hyphens, and data rows, separating columns with vertical bars. Tables require an extended dialect such as GFM, so test them in the destination.

How do I add an image in Markdown?

Write an exclamation mark, descriptive alt text in square brackets, and the image path in parentheses: ![Alt text](image.png). Confirm the path from the Markdown file’s location.

Why does Markdown look different across apps?

Apps may use different parsers, extension sets, and stylesheets. CommonMark reduces ambiguity in the core syntax, while platform-specific features still vary. Preview with the final renderer.

Can Markdown be converted to PDF?

Yes. A converter renders Markdown into an intermediate document or HTML and then produces a PDF. Check tables, code wrapping, page breaks, images, and links in the final file.