Markdown Reference
Kip Landergren
(Updated: )
My cheat sheet for Markdown covering common authoring examples and documentation links.
Contents
markdown-study
README.md
# markdown-study
Personal study area for [GitHub-flavored markdown](https://github.github.com/gfm/)
code.md
You can specify `inline code` or:
```
block level code
```
and, for GitHub, specify the [language](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml):
```ruby
[1,2,3].map {|x| x * x }
```
links.md
## hrefs
[link text](https://example.com)
## anchor links
[link to heading foo](#foo)
Difficulties:
* determining correct fragment (e.g. headings with complex characters)
* keeping up to date if heading title changes
### foo
lists.md
# unordered lists
No spaces, then a dash (`-`) or asterisk (`*`). Sublists are indented with two spaces.
- Item A
- Item B
- Item C
- C Child 1
- C Child 2
tables.md
# per column alignment
| left | center | right | default (left aligned) |
|:------------|:-----------:|------------:|------------------------|
| lorem | lorem | lorem | lorem |
| lorem ipsum | lorem ipsum | lorem ipsum | lorem ipsum |
(afaik: no way to apply alignment per cell)
text.md
## emphasis
_foo_ -> `<em>foo</em>`
*foo* -> `<em>foo</em>`
## strong
__foo__ -> `<strong>foo</strong>`
**foo** -> `<strong>foo</strong>`
Frequently Asked Questions (FAQs)
Why are they called “atx-style” headers?
In reference to Aaron Swartz’ atx format.
atx-style:
# h1
## h2
setext-style:
h1
==
h2
--
Further reading:
How do you add a caption to a table?
Captions are not supported.
Resources
- CommonMark - A strongly defined, highly compatible specification of Markdown
- GitHub Flavored Markdown
- Markdown Wikipedia Page
- Markdown: Syntax
- Extended Syntax