Introduction

Markdown is a lightweight and easy-to-use syntax for styling all forms of writing on the GitHub platform.

What you will learn:
  • How the Markdown format makes styled collaborative editing easy
  • How Markdown differs from traditional formatting approaches
  • How to use Markdown to format text
  • How to leverage GitHub’s automatic Markdown rendering
  • How to apply GitHub’s unique Markdown extensions

What is Markdown?

Markdown is a way to style text on the web. You control the display of the document; formatting words as bold or italic, adding images, and creating lists are just a few of the things we can do with Markdown. Mostly, Markdown is just regular text with a few non-alphabetic characters thrown in, like # or *.

You can use Markdown most places around GitHub:

  1. Gists
  2. Comments in Issues and Pull Requests
  3. Files with the .md or .markdown extension

For more information, see “Writing on GitHub” on GitHub in the help sub domain.

Examples

Text

                
  It's very easy to make some words **bold** and other words *italic* with Markdown. You can even 
  [link to Google!](http://google.com)
                
              

It's very easy to make some words bold and other words italic with Markdown. You can even link to Google!

Lists

                
  Sometimes you want numbered lists:

  1. One
  2. Two
  3. Three
  
  Sometimes you want bullet points:
  
  * Start a line with a star
  * Profit!
  
  Alternatively,
  
  - Dashes work just as well
  - And if you have sub points, put two spaces before the dash or star:
    - Like this
    - And this
                
              

Sometimes you want numbered lists:

  1. One
  2. Two
  3. Three

Sometimes you want bullet points:

  • Start a line with a star
  • Profit!

Alternatively,

  • Dashes work just as well
  • And if you have sub points, put two spaces before the dash or star:
    • Like this
    • And this

Images

                
  If you want to embed images, this is how you do it:

  ![Image of cat](./assets/cat.png)
                
              

If you want to embed images, this is how you do it:

white cat

Headers & Quotes

                
    # Structured documents

    Sometimes it's useful to have different levels of headings to structure your documents. Start lines with a `#` to create headings. Multiple `##` in a row denote smaller heading sizes.
    
    ### This is a third-tier heading
    
    You can use one `#` all the way up to `######` six for different heading sizes.
    
    If you'd like to quote someone, use the > character before the line:
    
    > Coffee. The finest organic suspension ever devised... I beat the Borg with it.
    > - Captain Janeway
                
              

Structured documents

Sometimes it’s useful to have different levels of headings to structure your documents. Start lines with a # to create headings. Multiple ## in a row denote smaller heading sizes.

This is a third-tier heading

You can use one # all the way up to ###### six for different heading sizes.

If you’d like to quote someone, use the > character before the line:

Coffee. The finest organic suspension ever devised… I beat the Borg with it. - Captain Janeway

Syntax guide

Here’s an overview of Markdown syntax.

Headers


  # This is an <h1> tag
  ## This is an <h2> tag
  ###### This is an <h6> tag

            

GitHub Flavored Markdown

GitHub.com uses its own version of the Markdown syntax that provides an additional set of useful features, many of which make it easier to work with content on GitHub.com.

Note that some features of GitHub Flavored Markdown are only available in the descriptions and comments of Issues and Pull Requests. These include @mentions as well as references to SHA-1 hashes, Issues, and Pull Requests. Task Lists are also available in Gist comments and in Gist Markdown files.

Markdown Resources