Markdown Notes

Table of Contents

Section 5: Code & Quotes

Code

There are times (such as in this course) when you will want to include segments of code in your document, and Markdown has a few different options for how to do this, depending on your needs.

To denote a character, word, or phrase as code, simply surround it with backticks `:

`This is my first line of code`

This is my first line of code

To create longer block of code which spans multiple lines though, you will need to surround your entire code segment with three backticks ``` on their own line breaks:

```
This is a block of code.
It has multiple lines.
```
This is a block of code.
It has multiple lines.

Quotes

In larger documents, you may want to quote a segment from another work or draw attention to a passage. This can be accomplished using block quotes.

To block quote a single sentence or paragraph, you simply need to place an angled bracket and a space before the quote >:

> This is a block quote.

This is a block quote.

You may want to quote multiple paragraphs though, in which case you will need to follow the same step as above for each paragraph. But for each line break, you will need to add another angled bracket and space between the paragraphs:

> This is a block quote.
> Unfortunately, I forgot to use line spacing correctly.

This is a block quote.Unfortunately, I forgot to use line spacing correctly.

> This is a block quote.
> 
> Now I know how to use line spacing.

This is a block quote.

Now I know how to use line spacing.