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

# links

## hrefs

[This](https://example.com) is a link!

## linking section headings

Section headings within a `.md` document can be
[linked](#linkingsectionheadings) to via anchor tags. I have found the easiest
way to determine the link manually is to view the `.md` on GitHub and hover over
the section to see the generated relative link, and then use that. Up to you to
keep the link up to date if the title changes. For everything else, automate it!

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

| align left (entire column) | align center (entire column) | align right (entire column) | default (entire column) |
| :--- | :---: | ---: | --- |
| `git status` | \| an escaped pipe | ` a single backtick | default alignment |

As far as I know there is not a way to apply alignment on a per cell basis.

text.md

# emphasis and strong

I find it helpful to remember that the markdown will be converted to HTML. To
get the text wrapped in an `em` tag, use:

_emphasized text_
*also emphasized text*

to get text wrapped in a `strong` tag, use:

__strong text__
**some more strong text!**

Resources