Markdown - aisaav/QuickReference GitHub Wiki

Markdown

Here is a page for some markdown formatting commands and tricks I often use


Inline Markups

Name Description Comand/Syntax
Italics Turns text into italics _Text_ or *Text*
Bold Turns text into bold __Bold__ or **Bold**
Code Turns a snippet of text into code format code()
Strikethrough Cross out ~~text ~~ ~~Text~~
All bold and italic Turns text into bold and italic ***Text***

Note: can also nest these syntax styles

Headers

Name Description Comand/Syntax
H1 Header Format 1 # <Header Text> or ==== under Header Text
H2 Header Format 2 ## <Header Text> or --- under Header Text
H3 Header Format 3 ### <Header Text>
H4 Header Format 4 #### <Header Text>
H5 Header Format 5 ##### <Header Text>
H6 Header Format 6 ###### <Header Text>

Formatting

Name Description Comand/Syntax
Blockquotes Quote text >Text
Nested Blockquotes Quote text within a quoted text > >Text
Bullet lists Create bullet lists (3 types) Type 1: *Text Type 2: -Text Type 3: +Text
Numbered Lists Create a numbered list with a number, a period, and space 1. Text note: subsequent paragraphs of a list item must have matching indent, avoid accidental numbered lists with \.
Alternative Code Representation Represent text as code Double indent - will end when indent pattern does not match
Horizontal Rules Add a divider to break up sections of text Way 1: * * * Way 2: *** Way 3: - - - Way 4:----
Task Lists Add a checkbox style todo list - [x] checked or - [] unchecked

Tables

Markdown also lets you create tables to format your documents to create a table you can do the following, add | pipes and - to show table divisions and use : to align text

| Header Cell| Header cell 1| ... | Header Cell n |
|---|:---|---|---:|
| Cell | Cell | Cell | Cell |
Header Cell Header cell 1 ... Header Cell n
Cell Cell Cell Cell

Definitions

Define items by using []:
Example: [id]: value

Links

Name Description Comand/Syntax
Links Add embedded link to your page This is [an example](http://example.com/ "Title") inline link. [This link](http://example.net/) has no title attribute.
Local Source Links Reference a resource on same server [Text](/resource/)
Reference Style Links Different way to create links with references This is [an example][id] reference-style link. Then, anywhere in the document, you define your link label like this, on a line by itself: [id]: http://example.com/ "Optional Title Here"
Automatic Links Show actual text of URL while also making it a link <http://example.com/>

Link examples summary

  • Square brackets containing the link identifier (optionally indented from the left margin using up to three spaces);
  • followed by a colon;
  • followed by one or more spaces (or tabs);
  • followed by the URL for the link;
  • optionally followed by a title attribute for the link, enclosed in double or single quotes, or enclosed in parentheses

Examples:

I get 10 times more traffic from [Google][] than from
[Yahoo][] or [MSN][].
[google]: http://google.com/        "Google"
[yahoo]:  http://search.yahoo.com/  "Yahoo Search"
[msn]:    http://search.msn.com/    "MSN Search"

or

I get 10 times more traffic from [Google](http://google.com/ "Google")
than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or
[MSN](http://search.msn.com/ "MSN Search").

Images

Name Description Comand/Syntax
Inline Image Syntax Add an image inline method ![Alt text](/path/to/img.jpg) ![Alt text](/path/to/img.jpg "Optional title")
Reference Image Syntax Similar concept to referenced style links ![Alt text][id] Then, anywhere in the document, you define your link label like this, on a line by itself: [id]: url/to/image "Optional title attribute"
Example Code Result
Github Logo image inline ![Github Logo](https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png) Github Logo
Github Logo image reference ![Github Logo][gl] [gl]: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png Github Logo2

Misc & Summary

Backslash escapes

Markdown lets you add backslash escapes to certain characters to prevent them from being mistaken for syntax

  • \ backslash
  • ` backtick
  • * asterisk
  • _ underscore
  • {} curly braces
  • [] square brackets
  • () parentheses
  • # hash mark
  • + plus sign
  • - minus sign (hyphen)
  • . dot
  • ! exclamation mark

References & Sources used

Markdown Cheatsheet
Dairing Fireball- detailed explanations
Github Docs