Skip to content

Latest commit

 

History

History
184 lines (131 loc) · 4.07 KB

markdown-cheat-sheet.md

File metadata and controls

184 lines (131 loc) · 4.07 KB

Markdown

Emphasis

Emphasis (italics) with asterisks or underscores

Strong emphasis (bold) with double asterisks or double underscores

Strike through with double tildes

Unordered list

Unordered list with leading asterisks, hyphens, or plus signs:

  • Item
  • Item
    • Nested Item
    • Nested Item
  • Item
    • Nested Item
      • Double Nested Item

Ordered list

Ordered list with leading 1.:

  1. Item
  2. Item
    1. Nested Item
    2. Nested Item
  3. Item
    1. Nested Item
      1. Double Nested Item

Mixed list and paragraphs

  • Item

  • Item

    Paragraph for list item with a blank line and leading whitespace character

    • Nested Item
  • Item

    1. Nested Item

    2. Nested Item

      Paragraph 1 for nested list item with a blank line and 2 leading whitespace characters

      Paragraph 2 for nested list item. To create a line break
      without creating a new paragraph, add two trailing spaces.

Link

Image

The syntax for an image is the same as that for for a link but with a leading exclamation mark:

In-line style

Reference style

Image that is a link:

Duck Duck Go

In-line code

  • In-line code with backticks

Block quote

Block quote with a leading greater-than sign. You can continue onto a new line (but a new line will not be displayed in the output). You can embed Markdown in block quotes.

HTML

Hello
used as a greeting or to begin a conversation
Goodbye
used to express good wishes when parting or at the end of a conversation

Line breaks

This line is displayed in its own paragraph.

This line is part of a new separate paragraph. This line is displayed as if it is part of the previous line.

This line is part of a new separate paragraph.
This is a new line in the same paragraph.

Code block

Code block
	with triple backticks.
  Whitespace is preserved.
npm install
npm start
// This code block will be syntax highlighted as JavaScript
function sayHello() {
	console.log('Hello')
}
<!-- This code block will be syntax highlighted as HTML -->
<div>
	<i>Hello</i>
</div>

Note: Syntax highlighting is not supported in core Markdown spec but is supported in GitHub Flavored Markdown

Task list

Task list with leading square brackets:

  • Completed task
  • Completed task
  • Uncompleted task

Note: Task lists are not supported in core Markdown spec but are supported in GitHub Flavored Markdown

Table

Table with vertical lines and dashes:

Name Email Age Alias
John Doe [email protected] 45 heresjohnny
Jane Doe [email protected] 43 janeofthejungle

Notes:

  • Colons can be used to align columns
  • Outer vertical lines are optional
  • Raw Markdown does not need to line up prettily
  • Can embed in-line Markdown

Note: Tables are not supported in core Markdown spec but are supported in GitHub Flavored Markdown

Markdown Horizontal Rules

A horizontal rule with a series of (3+)

underscores


asterisks


Markdown Heading 1 with equal signs

Markdown Heading 2 with hyphens

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6