Markdown & GFM Syntax Guide

Markdown is a lightweight markup language for creating formatted text using a plain-text editor. This guide covers both standard Markdown and GitHub Flavored Markdown (GFM).Feel free to edit the code blocks below to see the preview update in real-time!

Basic Syntax

These are the core Markdown elements outlined in John Gruber's original design document. They work in almost every Markdown application.

Headings

To create a heading, add one to six # symbols before your heading text. The number of hashes determines the heading level.

Editable Markdown
Live Preview

Heading level 1

Heading level 2

Heading level 3

Heading level 4

Heading level 5
Heading level 6

Emphasis (Bold & Italic)

You can add emphasis by making text bold or italic.

Editable Markdown
Live Preview

I just love bold text.
It is also possible to use bold text.

Italicized text is the cat's meow.
You can also use underscores.

This text is really important.

Lists

You can organize items into ordered and unordered lists.

Editable Markdown
Live Preview

Unordered List:

  • First item
  • Second item
  • Third item
    • Indented item
    • Another indented item

Ordered List:

  1. First item
  2. Second item
  3. Third item
    1. Indented item
    2. Another indented item

Images

To add an image, add an exclamation mark (!), followed by alt text in brackets, and the path or URL to the image asset in parentheses.

Editable Markdown
Live Preview

xyzEditor Logo

Blockquotes

To create a blockquote, add a > in front of a paragraph.

Editable Markdown
Live Preview

Dorothy followed her through many of the beautiful rooms in her castle.

The Witch bade her clean the pots and kettles and sweep the floor.

Horizontal Rules

To create a horizontal rule, use three or more asterisks (***), dashes (---), or underscores (___) on a line by themselves.

Editable Markdown
Live Preview

Three underscores:


Three asterisks:


Extended Syntax (GFM)

GitHub Flavored Markdown (GFM) adds features that aren't available in standard Markdown. xyzEditor fully supports these extensions.

Tables

To add a table, use three or more hyphens (---) to create each column's header, and use pipes (|) to separate each column.

Editable Markdown
Live Preview
SyntaxDescriptionTest Text
HeaderTitleHere's this
ParagraphTextAnd more

Notice the colons (:) in the second row? They dictate the text alignment of the column (left, center, or right).

Fenced Code Blocks & Syntax Highlighting

Use three backticks (```) or three tildes (~~~) to enclose code. You can specify a language next to the backticks to enable syntax highlighting.

Editable Markdown
Live Preview
function calculateTax(amount, rate) { return amount * rate; }

Strikethrough

You can cross out words by putting two tildes (~~) before and after the text.

Editable Markdown
Live Preview

The world is flat round.

Footnotes

Footnotes allow you to add notes and references without cluttering the body of the document. When you create a footnote, a superscript link with a number appears where you added the footnote reference.

Editable Markdown
Live Preview

Here's a simple footnote,1 and here's a longer one.2

Footnotes

  1. This is the first footnote.

  2. Here's one with multiple paragraphs and code.

    Indent paragraphs to include them in the footnote.

    { my code }

    Add as many paragraphs as you like.

Emoji

You can add emoji to your Markdown file by typing the emoji directly or by using emoji shortcodes.

Editable Markdown
Live Preview

Gone camping! ⛺ Be back soon.

That is so funny! 😂

Task Lists

Task lists allow you to create a list of items with checkboxes.

Editable Markdown
Live Preview
  • Write the press release
  • Update the website
  • Contact the media

Alerts (GitHub style)

Alerts are a Markdown extension based on the blockquote syntax that you can use to emphasize critical information. There are 5 types of alerts: NOTE, TIP, IMPORTANT, WARNING, and CAUTION.

Editable Markdown
Live Preview

NOTE

Useful information that users should know.

TIP

Helpful advice for doing things better.

WARNING

Urgent info that needs immediate attention.

Want to keep this guide offline?

xyzEditor excels at local-first, privacy-focused PDF generation. You can instantly save this entire guide as a beautifully formatted PDF document.