Markdown

Markdown

1. Elements

1.1 Block Quote


Syntax

> This is a quote  
>  
>> Nested quote

Example Output

This is a quote

Nested quote

1.2 Ordered List


Syntax

1. First
2. Second
    1. Numbers
    1. Don’t matter

Example Output

  1. First
  2. Second
    1. Numbers
    2. Don’t matter

1.3 Unordered List


Syntax

* Asterisks
* List
    * Nested

+ Can also use plus sign

- Can also use dash

Example Output

  • Asterisks
  • List
    • Nested
  • Can also use plus sign

  • Can also use dash

1.4 Images


Syntax

![Alt](https://a.com)
![Relative](/img.jpg)

HTML Output <img src=”https://a.com” alt=”Alt” />
<img src=”/img.jpg” alt=”Relative” />

1.5 Checklist


Syntax

- [ ] Must include space
- [x] Completed

Example Output (It doesn’t work in Jekyll.)

  • Must include space
  • Completed

1.6 Tables


Syntax

| Name | Age |
| ----- | --- |
| Kyle | 28 |
| Sally | 45 |

| Right | Center | Left |
| ----: | :----: | :--- |
| Kyle | 28 | Hi |
| Sally | 45 | Bye |

Example Output

Name Age
Kyle 28
Sally 45
Right Center Left
Kyle 28 Hi
Sally 45 Bye

2. Basic Text Elements

2.1 Headings


Syntax

# Head 1
## Head 2
### Head 3 {#my-id}
#### Head 4
##### Head 5
###### Head 6

HTML Output

<h1>Head 1</h1>
<h2>Head 2</h2>
<!-- Ids only allowed in
extended markdown -->
<h3 id=”my-id”>Head 3</h3>
<h4>Head 4</h4>
<h5>Head 5</h5>
<h6>Head 6</h6>

2.2 Paragraphs


Syntax

Will be same
paragraph
if only one new line used

New paragraph if two or
more new lines are used

HTML Output

<p>Will be same paragraph if only
one new line used</p>

<p>New paragraph if two or more new
lines are used</p>

2.3 Line Breaks


Syntax

Two spaces␣␣
at end of line will make
a line break

HTML Output

<p>Two spaces<br />
at end of line will make a line
break</p>

Automatic linking (last example) only allowed in extended markdown

Syntax

[Label](https://url.com)
[Relative](/other-page)
[Id](#my-id)
<https://url.com>
https://extended.com

HTML Output

<a href=”https://url.com”>Label</a>
<a href=”/other-page”>Relative</a>
<a href=”#my-id”>Id</a>
<a href=”https://url.com”>
  https://url.com
</a>
<a href=”https://extended.com”>
  https://extended.com
</a>

2.5 Horizontal Rule


Syntax

Needs new lines between

---

Can use asterisks or
underscores

***

Must use at least 3 but
can use more

________

HTML Output

Needs new line between
<hr />
Can use asterisks or
underscores
<hr />
Must use at least 3 but can
use more
<hr />

3. Text Styling

3.1 Bold


Syntax

This is **bold**
This is __also bold__
Use as**teris**ks for mid word bolding

Example Output
This is bold
This is also bold
Use asterisks for mid word bolding

3.2 Italics


Syntax

This is *italic*
This is _also italic_
Use as*teris*ks for mid word italics

Example Output
This is italic
This is also italic
Use asterisks for mid word italics

3.3 Italics/Bold


Syntax

This is ***both***
This is ___also both___
Any combo for __*both*__
Use as***teris***ks for mid word emphasis

Example Output
This is both
This is also both
Any combo for both
Use asterisks for mid word emphasis

3.4 Strikethrough


Syntax

This is ~~crossed out~~ 

Example Output

This is crossed out

3.5 Highlight


Syntax

This is ==highlighted== 

Example Output (It doesn’t work in Jekyll.)

This is ==highlighted==

3.6 Subscript


Syntax

$$H_2O$$

Example Output
\(H_2O\)

3.7 Superscript


Syntax

$$x^2$$

Example Output
\(x^2\)

3.8 Emoji


Syntax

I am happy :smile: 

Example Output

I am happy :smile:

4. Code

4.1 Inline Code


Syntax

JS Variable : `let x = 1`

HTML Output

JS Variable: <code>let x = 1</code>

4.2 Code Block


Technically this is only supported with extended markdown but it should work everywhere. Labeling the language (js in our case) is not as widely supported, but will give syntax highlighting where supported.

Syntax

const x = 3
let y = 4

HTML Output

<pre>
  <code>
    const x = 3
    let y = 4
  </code>
</pre>

© 2022. Byungchan Park. All rights reserved.