Comparison
Markdown vs HTML: when each is the right answer
Markdown for writing. HTML for rendering. They are not competing tools.
Markdown and HTML are often discussed as alternatives. They’re not. Markdown is a writer-friendly source format that compiles to HTML. HTML is the universal document-rendering format that browsers, email clients, and most static-site generators ultimately consume. The question isn’t which to pick — it’s which one you should be writing in.
The headline differences
| Aspect | Markdown | HTML |
|---|---|---|
| Created | 2004 (John Gruber) | 1993 (Tim Berners-Lee) |
| Goal | Easy to write, easy to read in plain text | Universal document structure |
| Typical syntax for bold | **bold** | <strong>bold</strong> |
| Compiles to | HTML | (it is the destination) |
| Standard | CommonMark + extensions | WHATWG HTML Living Standard |
| Tooling | Pandoc, marked, markdown-it | Every web browser |
When Markdown wins
- README files, docs, blog posts. The whole point. Read-while-writing, no tag noise, version control diffs cleanly.
- Comments, issues, chat messages. GitHub, Discord, Slack, every modern collaboration tool accepts Markdown. Bold, links, code blocks, lists — universal.
- Static-site generators. Hugo, Jekyll, Next.js MDX, every modern blog engine takes Markdown input.
- Anywhere prose dominates. Markdown is optimised for “text with occasional formatting” — exactly the ratio writers actually need.
When HTML wins
- Anything with complex layout. Multi-column, tables with cell-level styling, custom positioning. Markdown can’t express what CSS expects.
- Production web pages. The browser only renders HTML. Even when your source is Markdown, the deployed page is HTML.
- Email. Most email clients render HTML; very few render Markdown directly. Marketing emails use HTML + inline styles because email clients butcher anything more sophisticated.
- Interactive elements. Forms, scripts, iframes, accessibility attributes (aria-*, role) — HTML-only territory.
The flavours problem
“Markdown” isn’t one specification. Several incompatible flavours exist:
- CommonMark (2014, ongoing) — the standardisation effort. Strict and predictable. The baseline most modern parsers conform to.
- GitHub Flavored Markdown (GFM) — CommonMark plus tables, strikethrough, task lists, autolinks. The de facto standard for developer docs.
- Pandoc Markdown — extended for academic and book-length use: footnotes, citations, definition lists, math via LaTeX.
- Original John Gruber Markdown (2004) — underspecified in places. Different parsers handle edge cases differently.
If portability matters, write to CommonMark and avoid flavour-specific extensions.
HTML inside Markdown
Most Markdown parsers let you drop raw HTML inline when Markdown isn’t expressive enough. This is the pragmatic escape valve — keep 95% of your document as Markdown, drop into HTML for the table that needs cell colspans, the iframe embedding a video, the form.
Some parsers (StackOverflow’s, for instance) strip most HTML for security. Check the rendering context before relying on this.
The pragmatic rule
- Writing: Markdown. Always start in Markdown.
- Reading: HTML. The browser/email renders the HTML output of your Markdown.
- Edge cases: drop into HTML inline where needed.
- Email marketing, complex layouts, production web: HTML directly.
Related
Published May 15, 2026