Markdown cheatsheet

Handy guide for how to write in markdown, with markdown and preview. The preview is generated on Atom using Github markdown preview which you can enable by going to (Packages > Markdown Preview > Toggle Preview).

Formatting text

You can format text into italics, bold, bold italics and strikethrough. Markdown doesn't have the ability to underline.

Bullet points

You can use either of three characters to make bullet points using markdown. In a new line just type *, + or - followed by a space to make a bullet point.

Inline code

To create inline code block like this, just wrapping your code between two of these ` characters.

Code block

To insert a code block using markdown, place your code between two sets of ``` characters. On the top line, you can specify the language to get the colouring, as shown below.

If you don't specify the code language, you don't get the colour formatting.

Dividers

You can divide sections by using three asterisks in a row which makes a divider.

This one is my favourite! You can collapse text inside a dropdown by using the snippet shown below:

Headings

This is useful for formatting your documents nicely, just use the corresponding number of hashtags to define the heading level. You can go up to Heading 6.

Images

You can insert images by following the syntax below. The text inside the square brackets serves as alt text, which appears when you hover over the image.

Quotes

You can insert quotes in markdown using the > character on a new line, as shown below.

Tables

Here is the syntax to make a table in markdown. Use the | and - characters as shown below. Notice how you don't have to format it nicely in markdown but it will still work!

If you want, you can also format it nicely.

In the second table below, column 2 is centre aligned and column 3 is right alined by using colons as shown.

Todo

You can create a todo or a checklist in markdown by using the syntax below.

You can insert inline links in markdown by following the syntax below. The text that is visible is inside the square brackets and the URL is inside the curly brackets.

That's it for now, if you have any more tips and tricks in markdown, let me know.

I would like to credit these sources below which have been helpful for me in learning markdown.

Sources

  1. https://www.markdownguide.org/cheat-sheet/
  2. https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet