The Ultimate cheatsheet for markdown

The Ultimate cheatsheet for markdown

what is markdown and why you should use it

Markdown is a lightweight markup language for creating formatted text using a plain-text editor

Mostly markdown is used to write readme.md. After you finish and upload a project to GitHub then you want to explain some feature of the project, their markdown comes in the picture

Using markdown you can explain your project like the billow example

rsz_screenshot_2022-07-23_22-12-51.png

Most useful things in markdown

  • heading
  • Text styles
  • Code highlighting
  • Tables
  • Links
  • Images
  • List

Heading

just like in HTML we use h1 h2 h3 h4 h5 for heading the same way in markdown we use # ## ### #### #####

# heading 1
## heading 2
### heading 3
#### heading 4
##### heading 5

heading 1

heading 2

heading 3

heading 4

heading 5

Text Styling

We have two ways to bold the text.

1)  ** Bold one **  ,   __Blod two__     // Bold the text
2)  > quick brown fox jumps over the dog     // Blockquotes
3) * make the text italic *              // make the text italic
4) Rs. ~~299~~ 199   // this will cut 299 with a single line
5) Subscript <sub> useful while writing math context.</sub>
6)Superscript <sup>useful while writing math context.</sup>

1) Bold one , Blod two

2) quick brown fox jumps over the dog

3) make the text italic

4) Rs. 299 199

5) Subscript useful while writing math context.

6) Superscript useful while writing math context.

Code Highlighting

using backticks(```)* you can put your code, syntax is like this

``` print(" Hallo World ") ```

print(" Hello World ")

you also can highlight any keyword using single backticks ( ` )

Table


| Syntax      | Description | Test Text     |
| :---        |    :----:   |          ---: |
| Header      | Title       | Here's this   |
| Paragraph   | Text        | And more      |
output
SyntaxDescriptionTest Text
HeaderTitleHere's this
ParagraphTextAnd more

To embed any link, write the Title in the square bracket and the link in the parenthesis

[ Title ]( Link Address )
[ Google ]( https://Google.com )

Google

Images

![ Image name ]( Link Address )
![ Outdoor ]( https://images.unsplash.com/photo-1658494787703-ac2062c5b6ed?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwyN3x8fGVufDB8fHx8&auto=format&fit=crop&w=500&q=60 )

 Outdoor

List

For List, just write the number followed by text, and for sub-list just give an indent space and repeat

1. List
2. List
    1. Sub-List
    2. Sub-List

// you can also do that

- List
- List
    - Sub-List
    - Sub-List
  1. List
  2. List
    1. Sub-List
    2. Sub-List
  • List
  • List
    • Sub-List
    • Sub-List

Did you find this article valuable?

Support Rohan Malo's blog by becoming a sponsor. Any amount is appreciated!