This is a simple markdown cheat sheet for Github users. Hope you find it helpful. 🙂
Result |
Markdown |
|||||||
---|---|---|---|---|---|---|---|---|
Headings | # Heading L1 ## Heading L2 ### Heading L3 #### Heading L4 ##### Heading L5 ###### Heading L6 Note: There is a space between the number signs (#) and the heading name. |
|||||||
Font weights and styles | Normal text Bold text 1 Bold text 2 Italic text 1 Italic text 2 combine bold and Italic text |
Normal text **Bold text 1** __Bold text 2__ *Italic text 1* _Italic text 2_ _combine **bold** and Italic text_ ~~strikethrough text~~ |
||||||
Paragraphs | This is paragraph one. This is paragraph two and I am longer than paragraph one. |
This is paragraph one. This is paragraph two and I am longer than paragraph one. Note: Use a blank line to separate paragraphs. |
||||||
Line Breaks | This is line one. |
This is line one. Note: Add two or more spaces after a line to create line breaks. |
||||||
Unordered Lists |
|
* Item a * Item b * Item c * Item a * Item b * Item b1 * Item b2 * Item c Note: 1. You can use dashes (−) or plus signs (+) to replace asterisks (*) to create the same result. 2. Add two or more spaces before an item to create sub-list items. |
||||||
Ordered Lists |
|
1. First item 2. Second item 3. Third item 1. First item 1. Second item 1. Item 2a 1. Item 2a 1. Third item Note: 1. The numbers should start with the number one, but the rest of them don’t have to be in numerical order. 2. Add three or more spaces before an item to create sub-list items. |
||||||
Checkboxes | ✍️ |
- [ ] Item 1 - [x] Item 2 |
||||||
Links | I love GitHub. https://www.google.com name@email.com |
I love [Alt Text](http://www.github.com/ "This is an optional title.") .<https://www.google.com> <name@email.com> |
||||||
Tables |
|
|column 1|column 2|column 3| |:---|:---:|---:| |row 1a|row 1b|row 1c| Note: Use :--- to align table contents to the left; Use :---: to align table contents to the centre; Use ---: to align table contents to the right. |
||||||
Images | Inline-style: Reference-style: |
Inline-style:![Alt Text](/path-to/your-image.png "This is an optional title.") Reference-style: ![octocat][logo] [logo]: /path-to/your-image.png "This is an optional title." |
||||||
Code Blocks | ✍️ |
``` const greeting = "Hello World!"; console.log(greeting); ``` ```JavaScript const greeting = "Hello World!"; console.log(greeting); ``` ```diff - const data = []; + const data = {}; ``` Note: 1. Alternatively, you can put 4 spaces in front of every line of code to create a code block.2. You can swap JavaScript to other programme language names to highlight different languages in the code block. |
||||||
Inline Codes | console.log("Hello World!"); |
`console.log("Hello World!);` |
||||||
Blockquotes | This is a quote. |
> This is a quote. |
||||||
Mention issues | #523 | #523 |
||||||
Mention users | @username | @username |
||||||
Emojis | 🙂 👋 | 🙂 👋 Note: There are lots of emojis you can use, please have a look at this emoji cheat sheet. |
||||||
Horizontal Rules | --- Note: Alternatively, you can use *** (three asterisks) or ___ (three underscores) to replace --- (three Hyphens). |
|||||||
HTML Tags | 10 Downing Street London United Kingdom |
10 Downing Street<br> London<br> United KingdomNote: You can use any HTML tags. |
✍️ Because of some limitations in markdown, I use images
to represent the render results.