Text Tools

Markdown Cheat Sheet for Beginners – With the HTML Each Line Becomes

Markdown lets you write formatted text with simple symbols. It is used on GitHub, in many note apps and CMSs, and it converts cleanly to HTML.

In this article
  1. Why Markdown?
  2. The cheat sheet
  3. Tables, strikethrough and task lists
  4. Code blocks
  5. Links with titles and automatic links
  6. Common beginner mistakes
  7. Where Markdown differs between sites
  8. Converting to HTML
  9. Using the HTML

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.

Markdown to HTMLConvert Markdown to clean HTML as you type, with a live preview. Supports headings, lists, links, images, code, tables and GitHub-style Markdown. Download as HTML.
Open the free tool

The cheat sheet

You writeYou getHTML
# HeadingLarge heading<h1>
## SubheadingSmaller heading<h2>
**bold**bold<strong>
*italic*italic<em>
- itemBullet list<ul><li>
1. itemNumbered list<ol><li>
[text](https://site.com)Link<a href>
![alt](image.jpg)Image<img>
> quoteQuotation<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 do and - [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.

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 #: #Heading may 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

  1. Paste Markdown into Markdown to HTML.
  2. See the HTML and a live preview side by side. The preview runs in a sandbox, so scripts never execute.
  3. 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.

Markdown to HTMLConvert Markdown to clean HTML as you type, with a live preview. Supports headings, lists, links, images, code, tables and GitHub-style Markdown. Download as HTML.
Open the free tool
Keep reading

Related articles

All articles
Dev

How to Clean Up Messy HTML Code (and Find Problems Faster)

HTML from page builders, email templates and “view source” is often one long line or a tangle of tags. Formatting it is the first step to understanding and fixing it.

3 min read
Web

HTML Entities Explained – How to Show Code and Symbols Safely

Type “<b>” into a web page and it turns text bold instead of showing up. HTML entities are how you display special characters exactly as written.

3 min read
Text

What Is Lorem Ipsum – and When Should You Use It?

Designers fill mock-ups with odd Latin-looking text that starts “Lorem ipsum dolor sit amet”. Here is where it comes from and how to use it well.

3 min read