Markdown Github Cheat Sheet



A quick reference to Markdown.

To create a reference link we wrap both the link text and the reference text in brackets ' ' without quote and at the bottom we write the reference by wrapping the reference text in ' followed by a ':' both without quote and then we put the actual URL. This cheatsheet is copied from credit goes to adam-p. This is intended as a quick reference and showcase. For more complete info, see John Gruber's original spec and the Github-flavored Markdown info page. This cheatsheet is specifically Markdown.

Created on: 2018-07-19

Tag: cheat_sheet

There are many styles support in Markdown. So of them are as follows:

Italics

To make a phrase italic in Markdown, we can surround words which may span multiple words with an underscore '_' or '*' without quotes. For example:

Both gives the following output:

Writing in Markdown is not that hard!

Bold

To make phrases bold in Markdown, we can surround words which may span multiple words with two asterisks '__' or '**' without quotes. For example:

Both gives the following output:

Writing in Markdown is not that hard!

Markdown github cheat sheet 2020

Strikethrough

To strikethrough a phrases in Markdown, we can surround words which may span multiple words with two asterisks '~~' without quotes. For example:

Gives the following output:

Headers

To make headers in Markdown, we preface the phrase with a hash mark '#' without quotes. There are six types of headers, in decreasing sizes. We need to place the same number of hash marks as the size of the header we want:

Gives the following output:

Header two

Header three

Header four

Header five
Header six

Github Markdown Code

Alternatively, for Header one and Header two, an underline-ish style can be used:

Giving the same output of Header one and Header two:

Links

There are two different link types in Markdown:

Sheet
  • Inline

  • Reference

Markdown Github Cheat Sheet

Inline

To create an inline link, we need to wrap the link text in brackets '[ ]' without quote, and then we wrap the link in parenthesis '( )' For example:

Gives the following output:

Above is the simplest way of Markdown inline link. Here are some more examples:

Reference

To create a reference link we wrap both the link text and the reference text in brackets '[ ]' without quote and at the bottom we write the reference by wrapping the reference text in '[]' followed by a ':' both without quote and then we put the actual URL. For example:

Gives us the following output:

Here's a link to something else.

Above is the simplest way of Markdown reference link. Here are some more examples:

Images

If we know how to create links in Markdown, we can create images, too. The syntax is nearly the same.

To create an inline image link to https://octodex.github.com/images/bannekat.png, with an alt text that says, Benjamin Bannekat, we would write this in Markdown:

Giving us the following output:

This is called the inline style of image linking. Here are a few alternative ways to do it:

They both give us the following output:

We can also link an image with reference linking same as the Reference type of Links with the only difference where we need to put '!' without quote to the reference text. For example:

Gives us the following output:

The first father

The second first father

We can also do it like this:

Giving us the following output:

Blockquotes

If we need to call special attention to a quote from another source, or design a pull quote for a magazine article, then Markdown's blockquote syntax will be useful.

To create a block quote, all we have to do is preface a line with the 'greater than' caret '>' without quote. For example:

Gives us the following output:

I read this interesting quote the other day:

'Her eyes had called him and his soul had leaped at the call. To live, to err, to fall, to triumph, to recreate life out of life!'

We can also place a caret character on each line of the quote. This is particularly useful if your quote spans multiple paragraphs. For example:

Gives us the following output:

His words seemed to have struck some deep chord in his own nature. Had he spokenof himself, of himself as he was or wished to be? Stephen watched his face for somemoments in silence. A cold sadness was there. He had spoken of himself, of his ownloneliness which he feared.

- Of whom are you speaking? Stephen asked at length.

Cranly did not answer.

Lists

There are two types of lists in the known universe: unordered and ordered. That's a fancy way of saying that there are lists with bullet points, and lists with numbers.

Unordered

To create an unordered list, we'll want to preface each item in the list with an asterisk '*' or '-' or '+' without quote, one item par line. For example, a grocery list in Markdown might look like this:

Giving the output:

  • Milk

  • Eggs

  • Salmon

  • Butter

Occasionally, you might find the need to make a list with more depth, or, to nest one list within another. For example:

Gives us the following output:

  • Tintin

  • A reporter

  • Has poofy orange hair

  • Friends with the world's most awesome dog

  • Haddock

  • A sea captain

  • Has a fantastic beard

  • Loves whiskey

    • Possibly also scotch?

Ordered

An ordered list is prefaced with numbers, instead of asterisks. Take a look at this recipe:

  1. Crack three eggs over a bowl

  2. Pour a gallon of milk into the bowl

  3. Rub the salmon vigorously with butter

  4. Drop the salmon into the egg-milk bowl

To write that in Markdown, you'd do this:

We can also make unordered list under ordered list and vice-versa.

Paragraphs

Markdown has several ways of formatting paragraphs. If we forcefully insert a new line for each line, we would end up having a paragraph for each line. For example:

Would result in:

Do I contradict myself?

Very well then I contradict myself,

(I am large, I contain multitudes.)

This is called a hard break; where we can have soft break but giving two space ' ' without quote at the end of each line. For example:

Which will be rendered as

Do I contradict myself?

Very well then I contradict myself,

(I am large, I contain multitudes.)

Without the line break or two spaces, Markdown will consider all three line as one.:

Giving:

Do I contradict myself?Very well then I contradict myself,(I am large, I contain multitudes.)

Note

markdown-here Markdown Cheatsheet: Code and Syntax Highlighting, Tables, Inline HTML, Horizontal Rule, Line Breaks, YouTube Videos

Many website supports markdown or somewhat modified versions of markdown. I am listing a few bellow.

Facebook

It would seem as of Sept 11, 2019; Markdown is not supported in Facebook Post but it supports in Facebook Messenger. Messenger markdown support:

  • Bold with *text*

  • Italics with _text_

  • Strikethrough with ~text~

  • Monospace with `text`

  • Codeblock with:

  • LaTeX typesetting with (text)

source: https://www.facebook.com/help/147348452522644

Workplace

Workplace by Facebook (sort of Facebook for organization) supports Markdown on both Messenger and Post.

  • Bold with **text**

  • Italics with *text*

  • List with - item

  • Link with [title](https://facebook.com)

  • Numbered list with 1. first item

  • Quote with > quote

  • H1 with # Heading

  • H2 with ## Heading

  • Inline code with code

source: https://www.facebook.com/help/work/541260132750354

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:

  • Comments in Issues and Pull Requests
  • Files with the .md or .markdown extension

For more information, see “Writing on GitHub” in the GitHub Help.

Examples

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

Syntax guide

Here’s an overview of Markdown syntax that you can use anywhere on GitHub.com or in your own text files.

Headers

Emphasis

Lists

Unordered

Ordered

Images

Links

Blockquotes

Inline code

GitHub Flavored Markdown

Markup Language Cheat Sheet

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.

Syntax highlighting

Here’s an example of how you can use syntax highlighting with GitHub Flavored Markdown:

You can also simply indent your code by four spaces:

Here’s an example of Python code without syntax highlighting:

Task Lists

If you include a task list in the first comment of an Issue, you will get a handy progress indicator in your issue list. It also works in Pull Requests!

Tables

Github Flavored Markdown Cheat Sheet

You can create tables by assembling a list of words and dividing them with hyphens - (for the first row), and then separating each column with a pipe |:

Would become:

First HeaderSecond Header
Content from cell 1Content from cell 2
Content in the first columnContent in the second column

Markdown Github Cheat Sheet Examples

SHA references

Any reference to a commit’s SHA-1 hash will be automatically converted into a link to that commit on GitHub.

Issue references within a repository

Any number that refers to an Issue or Pull Request will be automatically converted into a link.

Github Flavored Markdown Cheat Sheet

Username @mentions

Typing an @ symbol, followed by a username, will notify that person to come and view the comment. This is called an “@mention”, because you’re mentioning the individual. You can also @mention teams within an organization.

Automatic linking for URLs

Any URL (like http://www.github.com/) will be automatically converted into a clickable link.

Strikethrough

Any word wrapped with two tildes (like ~~this~~) will appear crossed out.

Emoji

Markdown Github Cheat Sheet Free

GitHub supports emoji!

To see a list of every image we support, check out the Emoji Cheat Sheet.

Last updated Jan 15, 2014