Markdown reference
Markdown syntax and portability reference
Review headings, paragraphs, emphasis, links, images, lists, blockquotes, code, tables, and common portability concerns.
Document summary
A practical Markdown reference focused on readable source files and predictable rendering across repositories, documentation systems, and export tools.
Key takeaways
- Core Markdown is more portable than renderer-specific extensions.
- Blank lines and indentation can change structure.
- Always preview content with the actual destination renderer.
Use headings and paragraphs to define blocks
ATX headings use one to six # characters followed by a space. Paragraphs are separated by a blank line. Horizontal rules and blockquotes are also block-level structures.
#Title
Paragraph one
Paragraph two# Title
Paragraph one
Paragraph twoAdd emphasis, links, and images with readable source
| Content | Common syntax |
|---|---|
| Emphasis | *text* or _text_ |
| Strong emphasis | **text** |
| Inline code | `command` |
| Link | [label](https://example.com) |
| Image |  |
| Escaped punctuation | \*literal asterisk\* |
Keep lists and blockquotes structurally clear
Unordered lists commonly use -, *, or +. Ordered lists use numbers followed by periods. Nested items require consistent indentation supported by the renderer.
Blockquotes begin with >. Add blank lines around complex nested blocks for clearer and more portable source.
- Use consistent markers within one list.
- Indent nested items predictably.
- Separate a list from following prose with a blank line.
- Test task-list syntax because it is an extension.
Use inline and fenced code deliberately
Wrap short identifiers or commands in backticks. Use fenced code blocks for multi-line content and add a language identifier when syntax highlighting is supported.
Do not rely on the renderer to make unsafe HTML or scripts harmless. Documentation systems should sanitize untrusted content.
Run npm install and paste: <script>alert(1)</script>Run `npm install`.
```html
<script>example only</script>
```Treat tables and other extensions as target-specific
Tables, footnotes, task lists, definition lists, automatic links, and frontmatter are common extensions but are not rendered identically everywhere.
Choose a target profile and test the exact renderer before depending on extended syntax.
| Feature | Portability |
|---|---|
| Headings and paragraphs | High |
| Links and basic lists | High |
| Fenced code | Common but not universal in older parsers |
| Tables | Extension |
| Footnotes | Extension with varying syntax |
| Embedded HTML | May be stripped or disabled |
Check Markdown before publishing
- 1
Review heading order.
- 2
Check links and image paths.
- 3
Verify fenced code markers.
- 4
Preview tables and nested lists.
- 5
Confirm frontmatter fields if used.
- 6
Export and inspect the final destination format.