Skip to main content
Reference Guide·v1.0 · 2026

The Ultimate
Markdown Handbook

A complete visual reference — from basic syntax and GitHub extensions to AI prompting, Mermaid diagrams, and SEO-friendly structure. 18 chapters, accurately labelled.

01

What Is Markdown?

Markdown is a lightweight markup language created by John Gruber and Aaron Swartz in 2004. It was designed to be readable and writable as plain text, while converting cleanly to HTML — a human-friendly alternative to writing raw markup.

A Markdown parser reads plain text and converts it to HTML. The original specification was intentionally loose, which led to inconsistent behaviour across tools. In 2014, CommonMark was established as a stricter, unambiguous specification that most modern tools now follow.

Where Markdown is used

  • GitHub — README files, issues, pull requests, wikis, and discussions
  • Documentation tools — Docusaurus, MkDocs, Sphinx, Read the Docs
  • Static websites — Jekyll, Hugo, Eleventy, Astro, Next.js
  • Note-taking — Obsidian, Notion, Bear, Typora, Logseq
  • AI prompts — Claude, ChatGPT, and other LLMs respond well to structured Markdown
  • Technical writing — API docs, internal wikis, knowledge bases
  • Messaging — Slack, Discord, Jira, Confluence (all support subsets of Markdown)

Benefits

  • Human-readable in its raw form — no special application needed to read it
  • Portable — plain text files work everywhere, in any editor
  • Version-control friendly — git diff shows meaningful changes
  • Fast to write — no mouse or toolbar required

Limitations

  • No universal standard — different renderers behave differently
  • Limited layout control — no native image sizing, columns, or colour
  • Complex content (callouts, diagrams) requires platform-specific extensions
  • Assumes plain-text delivery — not suited for pixel-perfect visual layouts

Common flavours

  • Original Markdown — John Gruber's 2004 specification — the original, intentionally loose
  • CommonMark — A strict, unambiguous specification (2014) — the modern baseline
  • GitHub Flavoured Markdown (GFM) — CommonMark plus tables, task lists, alerts, mentions, and autolinks
  • MultiMarkdown — Extends CommonMark with footnotes, tables, cross-references, and metadata
  • Pandoc Markdown — Extensive extensions for academic writing, citations, and multi-format export
02

Headings and Basic Text

Headings are created with hash (#) symbols. The number of hashes maps directly to the HTML heading level — one hash for H1, two for H2, up to six for H6. Always include a space between the hash and the heading text.

markdown·Headings H1–H6Core Markdown
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6

Rendered

Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6

Bold, italic, and combined emphasis use asterisks or underscores. Using asterisks (*) is more universally supported than underscores inside words.

markdown·Bold and italicCore Markdown
**Bold text**
*Italic text*
***Bold and italic text***
__Also bold__
_Also italic_

Rendered

Bold text
Italic text
Bold and italic text
markdown·StrikethroughGitHub Flavoured Markdown
~~Strikethrough text~~

Rendered

Strikethrough text
Strikethrough is part of GitHub Flavoured Markdown. Support in other renderers varies.
markdown·Inline codeCore Markdown
Use `npm install` to install the package.
The variable `isActive` controls visibility.

Rendered

Use npm install to install the package. The variable isActive controls visibility.

Paragraphs

Paragraphs are separated by a blank line. A single line break within a paragraph is rendered as a space in most Markdown renderers — it does not create a new paragraph.

markdown·ParagraphsCore Markdown
First paragraph here.
Still the first paragraph.

This is a new paragraph.

Line breaks

To create a hard line break within a paragraph, end the line with two or more trailing spaces, or use the HTML <br> tag. Some parsers also accept a backslash (\) at the end of a line.

markdown·Hard line break (trailing spaces)Core Markdown
Line one with two trailing spaces  
Line two follows on a new line.
Trailing spaces are invisible and easy to lose in editors. In CommonMark, a backslash at the end of a line also creates a hard break. Check your renderer's support before relying on either.
03

Lists

Markdown supports unordered lists (using -, *, or + as bullets), ordered lists (using numbers followed by a full stop), nested lists, and — in GitHub Flavoured Markdown — task lists.

markdown·Unordered listCore Markdown
- First item
- Second item
- Third item

Rendered

  • First item
  • Second item
  • Third item
markdown·Ordered listCore Markdown
1. First item
2. Second item
3. Third item

Rendered

  1. First item
  2. Second item
  3. Third item
markdown·Nested listCore Markdown
- Parent item
  - Child item
  - Another child item
- Another parent
  - Nested under second parent
Indent nested items with exactly 2 spaces (or 4 in some parsers). Mixing tab and space indentation is a common source of broken list rendering.
markdown·Task listGitHub Flavoured Markdown
- [x] Completed task
- [ ] Pending task
- [ ] Another pending task

Rendered

  • Completed task
  • Pending task
  • Another pending task
Task lists are a GitHub Flavoured Markdown extension. They render as interactive checkboxes in GitHub issues and pull requests, and in supporting tools like Obsidian and Notion.

Common mistakes

  • Missing the space after the bullet marker (- Item not -Item)
  • Inconsistent indentation when nesting lists
  • Mixing - and * markers within the same list (technically valid, but inconsistent)
  • Forgetting a blank line before the first list item when it follows a paragraph
04

Links

Markdown supports several link syntaxes. The inline link is the most common. Always use meaningful, descriptive anchor text — avoid "click here" or bare URLs as anchor text.

markdown·Inline linkCore Markdown
[Visit the Anil G website](https://neelan.design)
markdown·Link with optional titleCore Markdown
[Anil G — UX Design Leader](https://neelan.design "Portfolio and articles")
The title attribute appears as a tooltip on hover in most browsers. It does not replace descriptive anchor text.
markdown·AutolinkCore Markdown
<https://neelan.design>
<neelakhandan@gmail.com>

Rendered

https://neelan.design
neelakhandan@gmail.com
markdown·Reference-style linkCore Markdown
Read the [Markdown Handbook][handbook] for a full reference.

More detail in the [articles section][articles].

[handbook]: https://neelan.design/markdown-handbook
[articles]: https://neelan.design/articles
Reference-style links keep long URLs out of the prose, improving readability in complex documents. The reference definitions can appear anywhere in the document.

Anchor links

Most Markdown renderers automatically generate anchor IDs from headings, allowing links to specific sections using #heading-text. The format varies by platform — GitHub lowercases all characters and replaces spaces with hyphens.

markdown·Anchor link (platform-dependent)Platform-specific
[Jump to Chapter 3](#lists)
[Jump to Chapter 7](#code)
05

Images

Image syntax is similar to links, with an exclamation mark prefix. The text in square brackets is the alternative text — a written description of the image, required for accessibility and shown when the image fails to load.

markdown·Basic imageCore Markdown
![A UX designer sketching on paper](images/ux-sketch.jpg)
markdown·Image with titleCore Markdown
![UX workshop session](workshop.jpg "Design thinking workshop, 2025")
markdown·Linked image (image as a hyperlink)Core Markdown
[![Anil G — Design Leader](profile.jpg)](https://neelan.design/about)
markdown·Reference-style imageCore Markdown
![Wildlife photography][hero]

[hero]: /images/leopard.jpg "Leopard at dawn"

Important notes

  • Alt text is not optional — always write a meaningful description for every image
  • Core Markdown has no native image sizing syntax — use HTML width attributes or platform-specific extensions where needed
  • Relative paths work locally but may break in published environments — prefer absolute paths or root-relative paths for deployed sites
  • Some platforms strip or sanitise HTML, preventing the <img> width/height approach
markdown·Image with size control (HTML required)HTML
<img src="diagram.png" alt="User journey diagram" width="600" />
06

Blockquotes and Horizontal Rules

Blockquotes are prefixed with a > symbol. They can be nested, and they can contain other Markdown elements including headings, lists, and code.

markdown·BlockquoteCore Markdown
> In the stillness of the wild, I found what design often forgets:
> the value of observation before action.
>
> — Anil G

Rendered

In the stillness of the wild, I found what design often forgets: the value of observation before action.

— Anil G

markdown·Nested blockquoteCore Markdown
> First level of quoting.
>
>> Second level nested inside the first.

A horizontal rule creates a thematic break between sections. Three or more hyphens, asterisks, or underscores on their own line will all produce the same output.

markdown·Horizontal rule (three variants)Core Markdown
---

***

___

Rendered


Always surround horizontal rules with blank lines. Without blank lines, --- below a line of text is interpreted as a Setext-style H2 heading — a common source of unintended formatting.
07

Code

Markdown provides two forms of code formatting: inline code for short snippets within text, and code blocks for multi-line code. Code blocks can be fenced (preferred) or indented.

markdown·Inline codeCore Markdown
Run `npm run dev` to start the development server.

Rendered

Run npm run dev to start the development server.

markdown·Fenced code block with languageCommonMark
```js
function greet(name) {
  return `Hello, ${name}`;
}

greet("Anil");
```
The language identifier after the opening fence enables syntax highlighting in supported renderers. Use standard identifiers: js, ts, py, css, bash, json, yaml, html, sql, diff.
markdown·Fenced code block — plain text (no language)CommonMark
```
This is a plain text block.
No syntax highlighting applied.
```
markdown·Indented code block (4 spaces)Core Markdown
    This line is indented with 4 spaces.
    It renders as a code block.
Fenced code blocks (triple backticks) are preferred over indented code blocks — they are unambiguous and support language identifiers. Use fenced blocks in all new documents.

Escaping backticks inside inline code

markdown·Escaping backticksCore Markdown
Use double backticks: `` `backtick` `` inside inline code.

For a literal backtick in a fenced block:

````
```
This fence uses four backticks.
```
````
08

Tables

Tables are not part of the original Markdown specification. They are defined by GitHub Flavoured Markdown and are widely supported, but behaviour can vary. A table requires a header row, a separator row, and at least one data row.

markdown·Basic tableGitHub Flavoured Markdown
| Name   | Role     | Location  |
| ------ | -------- | --------- |
| Anil   | Designer | Kochi     |
| Rajesh | Mentor   | Bengaluru |

Rendered

NameRoleLocation
AnilDesignerKochi
RajeshMentorBengaluru
markdown·Column alignmentGitHub Flavoured Markdown
| Left aligned | Centre aligned | Right aligned |
| :----------- | :------------: | ------------: |
| One          | Two            | Three         |
| Four         | Five           | Six           |
A colon on the left of the separator aligns left, on both sides for centre, and on the right for right alignment. The pipe characters do not need to align — the table will still render correctly, though aligned pipes are easier to read in source.

Notes on tables

  • Pipes inside table cells must be escaped with a backslash: \|
  • Tables with many columns can overflow on narrow mobile screens — consider a simplified layout for mobile users
  • Complex data is sometimes better expressed with a definition list or prose than a wide table
09

Footnotes

Footnotes allow you to add supplementary references without interrupting the flow of the main text. Support varies widely — they are available in GitHub Flavoured Markdown, Pandoc, MultiMarkdown, and some documentation tools, but not in the original Markdown spec or CommonMark.

markdown·Footnote syntaxPlatform-specific
Markdown was created in 2004.[^1]

CommonMark standardised the spec in 2014.[^2]

[^1]: John Gruber and Aaron Swartz, Daring Fireball, 2004.
[^2]: https://commonmark.org
Always verify that your target platform supports footnotes before using them. In renderers that do not support footnotes, the [^1] markers will appear as literal text in the output.
10

HTML Inside Markdown

Most Markdown renderers allow raw HTML inline within Markdown content. This is useful for elements that have no Markdown equivalent — such as collapsible sections, superscript, subscript, or custom attributes. However, HTML support is inconsistent and some platforms sanitise or strip it entirely.

markdown·Collapsible sectionHTML
<details>
  <summary>View additional context</summary>

  This content is hidden until expanded.

  You can include **Markdown** inside a details block.

</details>

Rendered

View additional context
This content is hidden until expanded. You can include Markdown inside a details block.
markdown·Superscript and subscriptHTML
x<sup>2</sup> + y<sup>2</sup> = z<sup>2</sup>

H<sub>2</sub>O

CO<sub>2</sub>

Rendered

x2 + y2 = z2
H2O
CO2

When to use HTML in Markdown

  • Only use HTML when Markdown cannot express the requirement
  • HTML inside Markdown reduces portability — the file may not render correctly in all tools
  • If your platform sanitises HTML, test before relying on it in production content
  • Prefer semantic HTML elements (details, summary, sup, sub) over presentational attributes
11

Callouts and Alerts

Callouts highlight important information — notes, tips, warnings, and cautions. There is no universal Markdown syntax for callouts. Each platform uses its own extension. The examples below are specific to the platforms listed — do not assume they work elsewhere.

GitHub alerts GitHub Flavoured Markdown

GitHub supports five alert types using a blockquote with a special keyword marker.

markdown·Alert — NOTEGitHub Flavoured Markdown
> [!NOTE]
> Useful information that users should know.

Rendered

NOTE

Useful information that users should know.

markdown·Alert — TIPGitHub Flavoured Markdown
> [!TIP]
> Helpful advice for doing things better.

Rendered

TIP

Helpful advice for doing things better.

markdown·Alert — IMPORTANTGitHub Flavoured Markdown
> [!IMPORTANT]
> Key information essential for users to succeed.

Rendered

IMPORTANT

Key information essential for users to succeed.

markdown·Alert — WARNINGGitHub Flavoured Markdown
> [!WARNING]
> Urgent information requiring immediate attention.

Rendered

WARNING

Urgent information requiring immediate attention.

markdown·Alert — CAUTIONGitHub Flavoured Markdown
> [!CAUTION]
> Advice about possible negative outcomes.

Rendered

CAUTION

Advice about possible negative outcomes.

Obsidian uses > [!note] syntax (lowercase). Notion, Docusaurus, and other tools use entirely different callout approaches. Always check your platform's documentation.
12

YAML Frontmatter

YAML frontmatter is a block of metadata placed at the very top of a Markdown file, delimited by triple-dashes (---). It is not part of Markdown itself — it is interpreted by static-site generators, documentation frameworks, and content management systems such as Jekyll, Hugo, Docusaurus, Astro, and others.

yaml·Typical frontmatter blockYAML
---
title: "The Ultimate Markdown Handbook"
description: "A complete visual reference to Markdown syntax and best practices."
author: "Anil G"
date: "2026-07-14"
slug: "ultimate-markdown-handbook"
tags:
  - markdown
  - documentation
  - reference
featured: true
draft: false
---

Common frontmatter fields

  • title — The page or post title used in the HTML <title> tag
  • description — A short summary used in meta descriptions and link previews
  • slug — The URL path segment for this page
  • date — Publication date — quote it to prevent YAML date parsing issues
  • tags — A YAML list of topic tags for categorisation
  • featured / draft — Boolean flags to control visibility and promotion
The supported fields and their exact behaviour depend entirely on your publishing platform. Dates should always be quoted in YAML ("2026-07-14") to prevent automatic date parsing that may produce unexpected results.
13

GitHub Flavoured Markdown

GitHub Flavoured Markdown (GFM) is a strict superset of CommonMark. It adds tables, task lists, strikethrough, autolinks, mentions, issue references, alerts, and diff syntax highlighting. GFM features work on GitHub and in tools that explicitly support GFM — they are not universal.

GFM features at a glance

  • Tables — Pipe-delimited tables with header and alignment rows
  • Task lists — - [x] and - [ ] checkboxes
  • Strikethrough — ~~text~~ renders as struck-through text
  • Autolinks — URLs and email addresses automatically become links without angle brackets
  • Mentions — @username links to a GitHub profile
  • Issue/PR references — #123 links to an issue or pull request in the same repo
  • GitHub alerts — > [!NOTE], > [!TIP], > [!WARNING], > [!IMPORTANT], > [!CAUTION]
  • Syntax highlighting — Language identifiers in fenced code blocks enable highlighting
markdown·Diff code blockGitHub Flavoured Markdown
```diff
+ Added line — shows in green on GitHub
- Removed line — shows in red on GitHub
  Unchanged context line
```

Autolinks in GFM

markdown·GFM autolinks (no angle brackets needed)GitHub Flavoured Markdown
Visit https://neelan.design for more articles.

Email anil@example.com directly.
GFM autolinks activate for URLs and email addresses in body text. In standard CommonMark, the <https://url> form is required.
14

Mermaid Diagrams

Mermaid is a diagramming language that renders inside Markdown code blocks using the mermaid language identifier. It is not part of core Markdown or CommonMark — it requires a Mermaid-enabled renderer. GitHub, GitLab, Notion, Obsidian, and many documentation frameworks support it.

markdown·FlowchartMermaid
```mermaid
flowchart LR
  A[Idea] --> B[Research]
  B --> C[Design]
  C --> D[Build]
  D --> E[Launch]
  E --> F{Review}
  F -->|Iterate| B
  F -->|Ship| G[Done]
```
markdown·Sequence diagramMermaid
```mermaid
sequenceDiagram
  User->>Application: Submit form
  Application->>Server: Validate and process
  Server-->>Application: Return result
  Application-->>User: Show confirmation
```
markdown·Entity relationship diagramMermaid
```mermaid
erDiagram
  USER ||--o{ PROJECT : creates
  PROJECT ||--o{ TASK : contains
  USER ||--o{ COMMENT : writes
  TASK ||--o{ COMMENT : receives
```
Mermaid diagrams will appear as plain code blocks in renderers that do not support Mermaid. Always verify that your target platform renders them before publishing documents that depend on them.
15

Markdown for AI

Large language models respond well to structured input. Markdown provides a natural way to create clear hierarchies, separate context from instructions, and specify exact output formats. Well-structured prompts reduce ambiguity and produce more consistent results.

Structural principles

  • Use headings to separate role, context, task, constraints, and output sections
  • Use lists for requirements — they are easier for a model to enumerate than long paragraphs
  • Use tables for structured comparison or multi-attribute data
  • Use code fences to supply source material, examples, or data the model should treat as literal text
  • Label examples explicitly — distinguish what you are showing from what you are asking
  • State the output format at the end: bullet list, numbered list, table, JSON, prose
  • Avoid deeply nested structures — they reduce clarity
markdown·Well-structured AI promptCore Markdown
# Role

Act as a senior UX researcher with experience in enterprise software.

# Context

We are evaluating an analytics dashboard used by financial analysts.
We have completed 8 user interviews. Interview notes are provided below.

# Task

Review the interview notes and identify recurring usability problems.

# Constraints

- Focus only on usability issues, not feature requests
- Do not speculate beyond what the notes support
- Flag if a finding appears only once and may not generalise

# Output

Provide:

1. A list of key themes (2–3 words each)
2. Supporting evidence for each theme (direct quotes preferred)
3. Severity: High / Medium / Low
4. Recommended next steps

---

# Interview Notes

[Paste notes here]
Markdown does not guarantee better AI output — it is a method for reducing structural ambiguity. Clear thinking and precise language still matter more than the formatting.
16

SEO-Friendly Markdown Structure

When publishing Markdown as web content, structure directly affects how search engines understand and rank the page. Clear heading hierarchies, meaningful links, descriptive alt text, and readable URLs all contribute to discoverability.

markdown·SEO-friendly article structureCore Markdown
---
title: "UX vs CX vs Service Design: Understanding the Differences"
description: "Three overlapping disciplines — but not interchangeable ones. Here's how to tell them apart."
slug: "ux-vs-cx-vs-service-design"
date: "2025-07-25"
tags: [UX, CX, Service Design]
---

# UX vs CX vs Service Design: Understanding the Differences

Opening paragraph that introduces the topic and the central question.

## What Is UX Design?

Explanation of UX Design with concrete examples.

### The Role of Research

Subsection drilling into a specific aspect.

## What Is CX?

Explanation of Customer Experience.

## What Is Service Design?

Explanation of Service Design.

## Key Differences at a Glance

| Dimension | UX          | CX              | Service Design    |
| --------- | ----------- | --------------- | ----------------- |
| Focus     | Product use | Full journey    | System design     |
| Output    | Interface   | Experience map  | Service blueprint |

## Key Takeaways

Bulleted summary of the main points.

## References

- [Source title](https://example.com "Source site")

SEO checklist for Markdown content

  • Use exactly one H1 — the page title
  • Maintain logical heading hierarchy (H1 → H2 → H3, never skip levels)
  • Write descriptive headings that reflect the content — not just keywords
  • Add meaningful alt text to every image
  • Use descriptive anchor text for links — not "click here" or "read more"
  • Keep URLs short, lowercase, and hyphen-separated (handled via the slug field)
  • Add a concise meta description (in frontmatter) under 160 characters
  • Avoid keyword stuffing — write for readers first
17

Common Mistakes

Most Markdown errors fall into a small number of repeating patterns. The checklist below covers the mistakes most likely to produce unexpected rendering across tools.

01

Skipping heading levels

Jumping from H1 directly to H3 breaks document structure and accessibility. Always use H1 → H2 → H3 in sequence.

02

Missing the space after #

`#Heading` does not render as a heading in CommonMark. Always write `# Heading` with a space.

03

Incorrect list indentation

Nested lists require consistent indentation. Most parsers expect 2 or 4 spaces. Mixing tabs and spaces causes broken rendering.

04

Broken code fences

A code fence opened with ``` must close with the same number of backticks on its own line. A missing closing fence breaks the entire rest of the document.

05

Unescaped pipe characters in tables

A literal | inside a table cell must be escaped as \|. Unescaped pipes break the column structure.

06

Empty link text

[] (empty square brackets) creates an inaccessible link. Always provide meaningful, descriptive anchor text.

07

Missing image alt text

![] with no alt text fails accessibility standards. Every image needs a written description.

08

Assuming all renderers behave identically

Markdown rendered on GitHub, Notion, Obsidian, and your documentation tool may differ. Always preview in your target environment.

09

Treating HTML as universally supported

Some platforms strip raw HTML. Never rely on HTML-only features for content that must reach all readers.

10

Using platform-specific syntax as if it were standard

GitHub alerts, Obsidian callouts, and Mermaid diagrams are extensions. Label them as such — they are not portable.

11

Not previewing before publishing

Markdown looks correct as plain text and broken as rendered HTML. Always preview the rendered output before publishing.

12

Placing the frontmatter block anywhere other than the top

YAML frontmatter must begin on line 1 of the file. A blank line or comment before it causes most parsers to ignore it.

The Ultimate Markdown Handbook · v1.0 · 2026

By Anil G · neelan.design

Back to Articles