The ultimate Markdown cheatsheet! A comprehensive, (eventually) all-encompassing Markdown reference. And that's only the beginning...
Much of the beginning information can be found at the links given below, however this Readme provides a concise and well-formatted reference sheet all in one place.
Besides this reference, however, I've included a Discussions board so anyone wanting to talk about anything related to Markdown can join. I hope this can become a place where others can find a community for Markdown and a good reference and support as well.
It started when I needed a good reference for Markdown, as I was still a beginner trying to learn how to make good and professional-looking documentation on Github, Jupyter, and for code in general. I searched through Github, it wasn't a complete search, but of several I found, it never seemed complete or as well-formatted as I thought it could be. I decided to make something more, an entire community on Github for Markdown, and a strong, yet still concise, to-the-point reference at the core of it all.
Want to get involved in some way? You're welcome to! If you want to talk about the project, or anything Markdown related, you're welcome to head over to the Discussions area here.
On the other hand, if you're interested in contributing to the project in some way and adding in your own needs, then first see the formatting guide for contributors here.
Refer to https://www.markdownguide.org/basic-syntax/ and https://www.markdownguide.org/extended-syntax/ for the complete standard reference.
- Headers
- Paragraphs
- Line Breaks
- Emphasis
- Blockquotes
- Lists
- Code
- Horizontal Rules
- Links
- Images
- Escaping Characters
- Tables
- Footnotes
Always remember to include a space after # and to leave == and -- on the line directly below your header.
Markdown: # Header 1
Markdown: ## Header 2
Markdown: ### Header 3
Markdown: #### Header 4
Markdown: ##### Header 5
Markdown: ###### Header 6
Markdown: Header Level 1
====
Markdown: Header Level 2
----
Paragraphs are only separated by a blank line break inbetween paragraphs and any additional formatting preference is left to the author.
Paragraph example 1.
Paragraph example 2.
Markdown: Paragraph example 1.
Paragraph example 2.
In Markdown, to leave a line break, you would put two spaces after text and press enter to continue on the next line, but as this is hard to see in an editor, the HTML tag:
<br>
is a much better choice in terms of clean raw formatting.
Example 1.
Example 2.
Example 3.
Markdown: Example 1.
Example 2.
<br>
Example 3.
You can use either ** or __ for a bold effect, but since you can only use ** for text within text, I would advise focusing strictly on ** usage.
Example 1.
Example 2.
Example 3.
Markdown: **Example 1.**
__Example 2.__
Ex**ampl**e 3.
You can use either * or _ for a italic effect, but since you can only use * for text within text, I would advise focusing strictly on * usage.
Example 1.
Example 2.
Example 3.
Markdown: *Example 1.*
_Example 2._
Ex*ampl*e 3.
You can use either ***, ___, or __*, **_ for a italic effect, but since you can only use *** for text within text, I would advise focusing strictly on *** usage.
Example 1.
Example 2.
Example 3.
Example 4.
Markdown: ***Example 1.***
___Example 2.___
__*Example 3.*__
**_Example 4._**
Example 1.
Markdown: > Example 1.
Example 1.
Example 2.
Markdown: > Example 1.
>
> Example 2.
Example 1.
Example 2.
Markdown: > Example 1.
>
>> Example 2.
- Example 1.
- Example 2.
- Example 3.
- Example 4.
- Example 5.
Markdown: 1. Example 1.
2. Example 2.
1. Example 3.
2. Example 4.
3. Example 5.
- Example 1.
- Example 2.
- Example 3.
- Example 1.
- Example 2.
- Example 3.
- Example 1.
- Example 2.
- Example 3.
Markdown: - Example 1.
- Example 2.
- Example 3.
<br>
* Example 1.
* Example 2.
* Example 3.
<br>
+ Example 1.
+ Example 2.
+ Example 3.
This is a code example.
Markdown: `This is a code example.`
Code blocks are created by indenting each line by four spaces or one tab (two tabs in VS Code).
It is more convenient and easily readable to use fenced code blocks, rather than indents which are explained ahead.
This is a code block.
<h2>
Hello! This is an example!
</h2>
Markdown: ````
<h2>
Hello! This is an example!
</h2>
````
text = "Hello"
for x in text:
print(x + x)
Markdown: ````python
text = "Hello"
for x in text:
print(x + x)
````
Markdown: ***
---
___
There is a compatibility issue with spaces in links. For best outcome, use %20 in a link where there should be a space.
Click here to go to Google.
Markdown: Click here to go to [Google](https://google.com).
Click here to go to Google.
Markdown: Click here to go to [Google](https://google.com "Google Oogle").
Markdown: <https://amazon.com>
<[email protected]>
You can position the referenced link(s) anywhere else further down in the document.
Markdown: [example][1]
[1]: https://google.com/images (example)
Markdown: ![Mona is hulaing... ^^](https://octodex.github.com/images/hula_loop_octodex03.gif)
Markdown: [![Noir Mona](https://octodex.github.com/images/privateinvestocat.jpg)](https://en.wikipedia.org/wiki/Film_noir)
* This would be an asterisk without the backslash.
Markdown: \* This would be an asterisk without the backslash.
The following listed can be escaped by a \ where they would otherwise be used to format text in Markdown.
Escapable Characters:
Backslash: \
Backtick: `
Asterisk: *
Underscore: _
Curly Braces: { }
Brackets: [ ]
Angle Brackets: < >
Parentheses: ( )
Pound Sign: #
Plus Sign: +
Minus Sign (hyphen): -
Dot: .
Exclamation Mark: !
Pipe: |
Although you can have varying cell widths, it doesn't look as readable as one that does have matching widths. You may want to create tables with some other tool or extension.
A couple to try:
Column 1 | Column 2 |
---|---|
Headers | Titles |
Palala | Text |
Markdown: | Column 1 | Column 2 |
| --------- | --------- |
| Headers | Titles |
| Palala | Text |
Column 1 | Column 2 |
---|---|
Headers | Titles |
Palala | Text |
Markdown: | Column 1 | Column 2 |
| :-------- | :-------- |
| Headers | Titles |
| Palala | Text |
Column 1 | Column 2 |
---|---|
Headers | Titles |
Palala | Text |
Markdown: | Column 1 | Column 2 |
| :-------: | :-------: |
| Headers | Titles |
| Palala | Text |
Column 1 | Column 2 |
---|---|
Headers | Titles |
Palala | Text |
Markdown: | Column 1 | Column 2 |
| --------: | --------: |
| Headers | Titles |
| Palala | Text |
The footnotes in a document will always be found at the very end of the document, placed there automatically.
Markdown: Example footnote 1.[^1] Example footnote 2.[^bignote]
But example footnote 3.[^text3]
[^1]: Hello. I'm footnote 1.
[^bignote]: Hola, I am footnote 2.
[^text3]: Yes, I'm example footnote 3!
(Example is shown above but not written, as it will disrupt the formatting flow of the rest of the document.)