layout | title |
---|---|
../../layouts/CheatSheet.astro |
Markdown Cheatsheet |
Markdown is a lightweight markup language with plain text formatting syntax. Its design allows it to be converted to many output formats, but the original tool by the same name only supports HTML. Markdown is often used to format readme files, for writing messages in online discussion forums, and to create rich text using a plain text editor.
# This is an `<h1>` tag
## This is an `<h2>` tag
###### This is an `<h6>` tag
_This text will be italic_
_This will also be italic_
**This text will be bold**
**This will also be bold**
_You **can** combine them_
~~ Text goes here ~~
<sub>This is a subscript text</sub>
<sup>This is a superscript text</sup>
<!-- This content will not appear in the rendered Markdown -->
Use a backslash (\) to ignore \*markdown formatting\*
Unordered
- Item 1
- Item 2
- Item 2a
- Item 2b
Ordered
1. Item 1
2. Item 2
3. Item 3
3.1. Item 3a
3.2. Item 3b
[GitHub](http://github.com)
![GitHub Logo](/images/logo.png)
Format: ![Alt Text](url)
Inline `code`
Blocks of code are either fenced by lines with three back-ticks ```, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting.
```javascript
function fancyAlert(arg) {
if (arg) {
$.facebox({ div: "#foo" });
}
}
```
Only supported in issues, pull requests, and discussions
`#0969DA`
`rgb(9, 105, 218)`
`hsl(212, 92%, 45%)`
| Syntax | Description |
| ------ | ----------- |
| Header | Title |
| Paragraph | Text |
As Kanye West said:
> We're living the future so
> the present is our past.
<dl>
<dt>Definition list</dt>
<dd>Is something people use sometimes.</dd>
<dt>Markdown in HTML</dt>
<dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
<dt>Markdown in Markdown</dt>
<dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
</dl>
Three or more of these (any):
... Periods
*** Asterisks
--- Hypens
___ Underscores
There's no such thing as a "line break" in Markdown. If you want a line break, you end the line with two or more spaces, then type return.
This is the first line.
This is the second line.
{% youtube %}https://www.youtube.com/watch?v=-A_WlNu6kVY{% endyoutube %}
{% gif %}https://media.giphy.com/media/3o7TKSjRrfIPjeiVyE/giphy.gif{% endgif %}
GitHub supports emoji!
:+1: :sparkles: :camel: :tada:
:rocket: :metal: :octocat:
This is a list of all the emojis that are supported by GitHub. For more information, see "Emoji Cheat Sheet".
```markdown
🍁🚀🙂🥵🎯⭐🤭❤️👍😊😂
```
- [x] @mentions, #refs, [links](), **formatting**, and <del>tags</del> supported
- [x] list syntax required (any unordered or ordered list supported)
- [x] this is a complete item
- [ ] this is an incomplete item
<details open>
Text goes here
</details>
Here is a simple footnote[^1].
A footnote can also have multiple lines[^2].
You can also use words, to fit your writing style more closely[^note].
[^1]: My reference.
[^2]: Every new line should be prefixed with 2 spaces.
This allows you to have a footnote with multiple lines.
[^note]:
Named footnotes will still render with numbers instead of the text but allow easier identification and linking.
This footnote also has been made with a different syntax using 4 spaces for new lines.