Markdown Syntax Guide — Everything You Need to Know in 2026
Master Markdown syntax from basics to advanced features. Headings, lists, tables, code blocks, links, and GitHub Flavored Markdown — all with examples.
Markdown has quietly become the most important writing format on the internet. It powers GitHub READMEs, documentation sites, blogs, note-taking apps, chat platforms, and even emails. If you write anything technical — or anything at all on the web — you will encounter Markdown. And yet, most people only know about 20% of what it can do.
This guide covers everything. From the absolute basics that every writer needs, through intermediate features that make documentation shine, to advanced GitHub Flavored Markdown extensions that most developers never learn. Every feature includes the raw syntax and what it produces, so you can use this as a living reference.
If you want to practice as you read, open the Markdown Editor and Preview tool on akousa.net in another tab. It renders Markdown in real time, so you can experiment with every example below.
Headings are the backbone of any Markdown document. They create structure, enable navigation, and — if you're writing for the web — they matter enormously for SEO. Use the # symbol followed by a space.
This is called "Setext-style" headings. It looks elegant in plain text but offers no advantage over the # syntax and only supports two levels. Most writers stick with # exclusively.
*italic text* or _italic text_**bold text** or __bold text__***bold and italic*** or ___bold and italic___
Renders as: italic text, bold text, bold and italic.
Best practice: use asterisks (*) rather than underscores (_). Underscores inside words like some_variable_name can cause unexpected rendering in some parsers. Asterisks never have this problem.
For documents with many links, reference-style keeps the text clean:
markdown
Check out [akousa.net][1] for developer tools,or read the [documentation][docs].[1]: https://akousa.net[docs]: https://akousa.net/docs"Documentation Hub"
The reference labels are case-insensitive and don't appear in the rendered output.
Supported languages vary by renderer, but common ones include javascript, python, typescript, html, css, bash, json, yaml, sql, rust, go, java, c, cpp, and dozens more.
Three or more hyphens, asterisks, or underscores on a line by themselves:
markdown
---***___
All three produce the same result. --- is most common. Use horizontal rules sparingly to separate major sections — headings are usually a better choice for structure.
| Left-aligned | Center-aligned | Right-aligned || :----------- | :------------: | ------------: || Left | Center | Right || Text | Text | 123 || More | More | 456 |
Left-aligned
Center-aligned
Right-aligned
Left
Center
Right
Text
Text
123
More
More
456
Tips for working with tables:
The columns don't need to be perfectly aligned in the source — but aligning them makes the source much more readable.
You can use inline formatting (bold, italic, code, links) inside table cells.
Tables cannot contain block-level elements like lists, code blocks, or headings.
For complex tables, consider using HTML directly inside your Markdown.
[^longnote]: This is a longer footnote with multiple paragraphs. Indent subsequent paragraphs by four spaces.
Footnotes are supported in most modern Markdown parsers, though they are not part of the original specification or GFM. They are part of the PHP Markdown Extra and CommonMark extensions.
Markdown was designed to coexist with HTML. You can drop raw HTML into any Markdown document:
markdown
This is a paragraph with <abbr title="Hypertext Markup Language">HTML</abbr> inside.<div style="padding: 16px; background: #f0f0f0; border-radius: 8px;"> <p>This is a styled HTML block inside Markdown.</p></div>
Important: Markdown formatting is not processed inside block-level HTML elements (<div>, <table>, <pre>, etc.). If you open a <div>, everything inside it is treated as raw HTML until the closing </div>.
Markdown is processed inside inline HTML elements (<span>, <em>, <a>, etc.).
GitHub Flavored Markdown builds on the CommonMark spec with several practical extensions. Since GitHub is where most developers encounter Markdown, understanding GFM is essential.
GFM supports syntax highlighting for hundreds of languages. This feature alone makes GFM-compatible renderers worth using. Here are examples in several languages:
markdown
```pythondef fibonacci(n): if n <= 1: return n return fibonacci(n - 1) + fibonacci(n - 2)``````sqlSELECT users.name, COUNT(orders.id) AS order_countFROM usersLEFT JOIN orders ON users.id = orders.user_idGROUP BY users.nameHAVING order_count > 5;``````yamlserver: host: localhost port: 3000 database: name: myapp pool_size: 10```
A more recent GFM addition — alert blocks for callouts:
markdown
> [!NOTE]> Useful information that users should know.> [!TIP]> Helpful advice for doing things better.> [!IMPORTANT]> Key information users need to know.> [!WARNING]> Urgent info that needs immediate user attention.> [!CAUTION]> Advises about risks or negative outcomes.
These render as styled callout boxes on GitHub. They're incredibly useful for documentation. Not all Markdown renderers support this syntax yet, but adoption is growing.
<details><summary>Click to expand</summary>This content is hidden by default.- You can use Markdown inside.- Lists, code blocks, everything works.</details>
This is technically HTML, not Markdown, but it's so commonly used in GitHub issues and READMEs that it's become part of the GFM ecosystem.
Forgetting blank lines. Many Markdown issues come from missing blank lines before and after block elements. Always put a blank line before headings, lists, code blocks, blockquotes, and tables.
Inconsistent list markers. Mixing -, *, and + within the same list can cause unexpected behavior. Pick one and stick with it.
Not escaping special characters. If your text contains characters like *, _, #, or |, and you don't want them interpreted as Markdown, escape them with a backslash.
Broken indentation in nested lists. Nested list items must be indented to the content start position of the parent item, not just by a tab. This is the single most common source of list rendering bugs.
Using tabs vs. spaces inconsistently. Some parsers handle tabs differently. Spaces are safer and more predictable.
Missing language identifiers on code blocks. Always specify the language after the opening triple backticks. Without it, you lose syntax highlighting, which makes code much harder to read.
Writing Markdown is easy in any text editor, but a good tool makes the experience significantly better. Here's what's available in 2026:
Browser-based editors are the fastest way to start. The Markdown Editor on akousa.net gives you a live split-pane preview as you type, supports GFM extensions, and requires no installation. It's particularly useful when you need to quickly draft a README or check how your Markdown will render.
Desktop editors like VS Code (with the Markdown All in One extension), Obsidian, Typora, and Zettlr offer deeper integration with your file system and workflow.
CLI tools like markdownlint and prettier can lint and format your Markdown files as part of a CI/CD pipeline, catching formatting issues before they reach production.
Why Markdown over other lightweight markup languages?
Feature
Markdown
reStructuredText
AsciiDoc
Org Mode
Learning curve
Low
Medium
Medium
High
GitHub support
Native
Partial
Partial
None
Extensibility
Limited
High
High
High
Tooling ecosystem
Massive
Medium
Medium
Niche
Read as plain text
Great
Good
Good
Fair
Markdown wins on simplicity and ecosystem size. If you need more power (cross-references, includes, custom directives), AsciiDoc or reStructuredText might serve you better. But for 90% of documentation and writing needs, Markdown is the right choice.
Markdown is deceptively simple. The basics take five minutes to learn. But the full specification — with GFM extensions, nested structures, and HTML escape hatches — gives you enough power to write anything from a quick comment to comprehensive technical documentation.
The key to getting good at Markdown is the same as any tool: use it. Write your notes in Markdown. Write your README files by hand instead of copying templates. Experiment with tables and nested lists until the syntax becomes muscle memory.
If you found this guide useful, you might also want to explore other developer-focused tools on akousa.net — from JSON formatters and regex testers to the Markdown editor mentioned throughout this post. Every tool runs entirely in your browser with nothing to install.