Overview
Markdown is (ironically) a markup language that simplifies creating formatted text. It aims to be easy to read in both formatted and plaintext versions. It is highly useful when creating easy to read documents that have hyperlinks and references, like these notes!
Syntax
Although simple to learn, markdown syntax can be complicated to follow as there is a largely been a lack of standardization in markdown parsing engines. This variation is mostly seen in the extended syntax as most not all engines support a common syntax, aka CommonMark.
Common Syntax
Element | Syntax |
---|---|
Headings | # for h1 or ## for h2 |
Bold | **bold** |
Italicized | *italicized* |
Ordered List | 1. one 2. two |
Unordered List | - one - two |
Code | `code` |
Horizontal Rule | --- |
Link | [link](https://www.example.com/) |
Image | ![image](https://www.example.com/) |
Blockquote | > blockquote here |
Most engines support replacing URLs with local files on links an images. For Links some even support putting header names in the URL section.
e.g. ![image](./local/image.png) or [link](#heading-name)
Extended Syntax
GitHub Flavored Markdown (GFM):
Element | Syntax |
---|---|
Strikethrough | ~~strikethrough~~ |
Tables | | col1 | col2 | ... |
Task List | - [ ] or - [x] |
Extended syntax is where it gets a little messy between different flavors of markdown. Refer to this great guide to see the syntax differences between the different flavors.