In this article
Why Markdown?
Markdown was created in 2004 by John Gruber as an easy-to-read way to write for the web. You type plain text with a few symbols, and it converts to clean HTML. It is the standard for README files on GitHub, documentation sites, many note-taking apps and forums such as Reddit and Discord.
The cheat sheet
| You write | You get | HTML |
|---|---|---|
# Heading | Large heading | <h1> |
## Subheading | Smaller heading | <h2> |
**bold** | bold | <strong> |
*italic* | italic | <em> |
- item | Bullet list | <ul><li> |
1. item | Numbered list | <ol><li> |
[text](https://site.com) | Link | <a href> |
 | Image | <img> |
> quote | Quotation | <blockquote> |
`code` | Inline code | <code> |
--- | Horizontal line | <hr> |
Tables, strikethrough and task lists
GitHub Flavored Markdown adds a few extras, all supported by the Markdown to HTML converter:
- Tables: separate cells with
|and put a row of---under the header. - Strikethrough:
~~old price~~. - Task lists:
- [ ] to doand- [x] done.
Code blocks
Put three backticks on the line before and after a block of code. Add the language name after the first backticks – such as ```js – so sites that support highlighting can colour it.
Links with titles and automatic links
You can add a tooltip to a link by putting text in quotes after the address: [ConvertNest](https://convertnest.net "Free online tools"). Many Markdown processors, including GitHub’s, also turn plain web addresses into links automatically. For email addresses and long links in documentation, angle brackets – <https://example.com> – make the intention clear.
Common beginner mistakes
- No blank line before a list or heading: it may merge with the paragraph above.
- Accidental code blocks: four spaces at the start of a line turn it into code.
- Forgotten space after #:
#Headingmay not become a heading. - Line breaks: in classic Markdown, a single line break does not start a new line; leave a blank line for a new paragraph.
Where Markdown differs between sites
There are several Markdown “flavours”. The basics above work everywhere, but extras differ: Reddit and Discord support spoilers, GitHub supports task lists and tables, and some note apps add their own symbols. If something does not render as expected on a particular site, check that site’s help page for its supported syntax.
Converting to HTML
- Paste Markdown into Markdown to HTML.
- See the HTML and a live preview side by side. The preview runs in a sandbox, so scripts never execute.
- Copy the HTML, or download a complete HTML page with simple styling.
Using the HTML
Paste the HTML into a CMS “HTML block”, an email newsletter tool or your own web page. To tidy it up, use the HTML Formatter. If you need to show HTML code as text on a page, encode it with the HTML Entity Encoder.