Markdown Cheatsheet

To create a beautiful markdown file, use this blog as a guide.

Markdown Cheatsheet

This cheatsheet will walk you through the syntax of a readme (markdown) file.

Heading

The heading's syntax is represented by the hash symbol. You should use the appropriate number of hash signs for the heading level. The example that follows clarifies it better:

# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6

Output:

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6



Blockquote

A blockquote is a sentence or paragraph that has been designed specifically to grab the reader's attention. Start a line with greater than > to insert a blockquote. The illustration is as follows:

>  "Live life to express, not to impress," as Martin Luther once remarked.

Output:

"Live life to express, not to impress," as Martin Luther once remarked.


Bold

For bold text, add two asterisks or underscores before and after a word or phrase. To bold the middle of a word for emphasis, add two asterisks without spaces around the letters. Below is the illustration :

**I am bold**
__I am bold__
I **am** bold

Output:

I am bold
I am bold
I am bold


Italic

To italicize text, add one asterisk or underscore before and after a word or phrase. To italicize the middle of a word for emphasis, add one asterisk without spaces around the letters. The illustration is as follows :

This text is italic*
_This text is italic_

Output:

This text is italic
This text is italic


Horizontal Line

To create a horizontal rule, use three or more asterisks (*), dashes (---), or underscores (___) on a line by themselves.

***
---
___

Output: The output of all three is identical.


Lists

Ordered and unordered lists can be used to organise items.

Ordered lists

To create an ordered list, line items with numbers and periods are added to create an ordered list. Though the list should begin with the number one, the numbers do not need to be listed in a specific order.

1. One
1. Two
1. Three

Output:

  1. One
  2. Two
  3. Three

Unordered lists

Add a plus sign (+), an asterisk (*), or a dash (-) in front of line items to make an unordered list. To make a list that is nested, indent one or more entries.

* First
* Second
* Third
    - One
    - Two
        + 1
         + 2

Output:

  • First
  • Second
  • Third
    • One
    • Two
      • 1
      • 2

Links

Markdown syntax for a hyperlink is square brackets followed by parentheses. The square brackets hold the text; the parentheses hold the link.

[Web search](https://www.google.co.in/)

Output:

Web search


Images

To add an image, add an exclamation mark (!), followed by alt text in brackets, and the path or URL to the image asset in parentheses. You can optionally add a title in quotation marks after the path or URL.

![Alt text](https://images.pexels.com/photos/109645/pexels-photo-109645.jpeg?cs=srgb&dl=pexels-mike-b-109645.jpg&fm=jpg)

Output:

Alt text


Code Blocks

You can use many lines in code blocks, and markdown will render them inside their own boxes with code type font. To achieve this, start your block with a line of three backticks. Another line of three backticks is required to finish.

```python
import numpy as np
l1 = [1, 2, 3, 4, 5]
l2 = [6, 7, 8, 9, 10]

#dot product
dot = 0
for i in range(len(l1)):
    dot += l1[i] * l2[i]
print(dot)

dot1 = np.dot(l1, l2)
print(dot1)
```

Output:

import numpy as np
l1 = [1, 2, 3, 4, 5]
l2 = [6, 7, 8, 9, 10]

#dot product
dot = 0
for i in range(len(l1)):
    dot += l1[i] * l2[i]
print(dot)

dot1 = np.dot(l1, l2)
print(dot1)