Logo
Tutorials

The Ultimate Markdown Guide

Yiğit | 12.06.2024

The Ultime Markdown Guide

Headings

Use hashtags to create headings of different levels:

# This is an h1 tag
## This is an h2 tag
### This is an h3 tag
#### This is an h4 tag
##### This is an h5 tag
###### This is an h6 tag

Emphasis

Use asterisks or underscores to add emphasis to your text:

*This text will be italic*
_This will also be italic_

**This text will be bold**
__This will also be bold_

_You **can** combine them_

Lists

Create unordered lists using asterisks or hyphens:

* Milk
* Bread
    * Wholegrain
* Butter

Create ordered lists using numbers:

1. Tidy the kitchen
2. Prepare ingredients
3. Cook delicious things

Images

Embed images using the following syntax:

![Alt Text](url)

Create links using the following syntax:

[link](http://example.com)

Blockquotes

Add blockquotes using the greater than symbol:

As Kanye West said:

> We're living the future so
> the present is our past.

Horizontal Rules

Insert horizontal rules using three hyphens:

---

Code Snippets

Indent a paragraph by four spaces to turn it into a code block:

    .my-link {
        text-decoration: underline;
    }

Reference Lists & Titles

Create reference lists and titles using the following syntax:

**The quick brown [fox][1], jumped over the lazy [dog][2].**

[1]: https://en.wikipedia.org/wiki/Fox "Wikipedia: Fox"
[2]: https://en.wikipedia.org/wiki/Dog "Wikipedia: Dog"

Escaping

Escape special characters using a backslash:

\*literally\*

Embedding HTML

You can embed HTML code directly into your Markdown:

<button class="button-save large">Big Fat Button</button>

Advanced Markdown

Note: The following syntax is not standard Markdown. They are extensions of the language.

Strike-throughs

Add strike-throughs using double tildes:

~~deleted words~~

Highlights

Add highlights using double equal signs:

==oooh fancy==

URLs will be automatically converted into links:

https://ghost.org

Markdown Footnotes

Add footnotes using the following syntax:

The quick brown fox[^1] jumped over the lazy dog[^2].

[^1]: Foxes are red
[^2]: Dogs are usually not red

GitHub Flavored Markdown

Syntax Highlighting

Add syntax highlighting to code blocks by specifying the language:

function fancyAlert(arg) {
  if(arg) {
    $.facebox({div:'#foo'})
  }
}

Task Lists

Create task lists using checkboxes:

  • @mentions, #refs, links, formatting, and tags supported
  • list syntax required (any unordered or ordered list supported)
  • this is a complete item
  • this is an incomplete item

Tables

Create tables using hyphens and pipes:

First Header | Second Header
------------ | -------------
Content from cell 1 | Content from cell 2
Content in the first column | Content in the second column

SHA References

References to commit SHA-1 hashes will be automatically converted into links:

16c999e8c71134401a78d4d46435517b2271d6ac
mojombo@16c999e8c71134401a78d4d46435517b2271d6ac
mojombo/github-flavored-markdown@16c999e8c71134401a78d4d46435517b2271d6ac

Issue References within a Repository

References to issues or pull requests will be automatically converted into links:

#1
mojombo#1
mojombo/github-flavored-markdown#1

Username Mentions

Mention users or teams using the @ symbol:

@username
@teamname

Emoji

GitHub supports emoji! Check out the Emoji Cheat Sheet.

References