Markdown Cheat Sheet

<< go back to my cheat sheets

Here is a basic Markdown cheat sheet to get started:

Headings, Emphasis and Lists

Below is an example of how to use headings, emphasis, and lists in Markdown:

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


- List item 1
- List item 2

1. List item 1
2. List item 2

- List item 1
  - Nested list item 1
- List item 2


Links can be added in Markdown using the syntax below:

[link text](http://link.url)

In Markdown, the “alt” text of a link or image provides a text-based alternative for the link or image. This can be helpful for users who are unable to see the link or image for any reason (e.g. Search Engines).


To add an image to a Markdown document, use the following syntax:

![image alt text](image.url)

And here is an example of an image in Markdown:

![A beautiful sunset](

If you are using a git repository to host your Markdown document, you will need to include the image files in the repository as well. Typically, images are stored in a separate directory within the repository, such as /images or /assets. Then, you can reference the image in your Markdown document using the URL of the image within the repository, such as /images/sunset.jpg.

Line Breaks

In Markdown, a line break can be indicated by including two or more spaces at the end of a line, followed by a newline (or “enter” key press). For example:

Line 1  
Line 2

Alternatively, you can create a line break by including a <br> HTML tag in your Markdown. This is useful when you want to include a line break in a specific location within a paragraph, rather than starting a new paragraph. For example:

Line 1<br>
Line 2

Keep in mind that not all Markdown parsers support the <br> tag, so it is best to stick with the two-space method for line breaks if possible.


To create a table in Markdown, use the following syntax:

| Column 1 | Column 2 | Column 3 |
| Cell 1   | Cell 2   | Cell 3   |
| Cell 4   | Cell 5   | Cell 6   |

Each row of the table is represented by a line of Markdown, with each cell of the row separated by a “pipe” character (|). The first row of the table should include the column headers, followed by a row of dashes (-) to create the table’s header. Subsequent rows should include the cells of the table, with each cell on its own line.

Inline Code

To create inline code with Markdown, enclose the code in single backticks (`). For example:

Use the `ls` command to list the files in the current directory.

This will create inline code that looks like this:

Use the ls command to list the files in the current directory.

Inline code is useful for referencing specific code or programming terms within a paragraph of text. Keep in mind that the backtick character (`) is typically located in the upper-left corner of most keyboards, next to the number 1 key.

For more information and advanced features, we can check out the official Markdown documentation.