Markdown Cheatsheet
Markdown is a lightweight and easy-to-use syntax for styling all forms of writing.
You control the display of the document; formatting words as bold or italic, adding images, and creating lists are just a few of the things we can do with Markdown. Mostly, Markdown is just regular text with a few non-alphabetic characters thrown in, like #
or *
.
Headers
# H1
## H2
### H3
#### H4
##### H5
###### H6
H1
H2
H3
H4
H5
H6
Emphasis
Bold with **asterisks**
Italic with _underscores_.
Combined with **asterisks and _underscores_**.
Strikethrough uses two tildes. ~~Scratch this.~~
Bold with asterisks
Italic with underscores.
Combined with asterisks and underscores.
Strikethrough uses two tildes. Scratch this.
Links
[Visit Wikipedia](www.wikipedia.com)
Blockquotes
To create a block quote, all you have to do is preface a line with the “greater than” caret (>). You can also place a caret character on each line of the quote. This is particularly useful if your quote spans multiple paragraphs.
block quote
Lists
To create an unordered list, you’ll want to preface each item in the list with an asterisk ( * ). Each list item also gets its own line. For example, a grocery list in Markdown might look like this:
- Milk
- Eggs
- Salmon
- Butter
* Milk
* Eggs
* Salmon
* Butter
Occasionally, you might find the need to make a list with more depth, or, to nest one list within another. Have no fear, because the Markdown syntax is exactly the same. All you have to do is to remember to indent each asterisk one space more than the preceding item. For example, in the following list, we’re going to add some sub-lists to each “main” list item, describing the people in detail:
- Tintin
- A reporter
- Has poofy orange hair
- Friends with the world’s most awesome dog
- Haddock
- A sea captain
- Has a fantastic beard
- Loves whiskey
- A sea captain
* Tintin
* A reporter
* Has poofy orange hair
* Friends with the world's most awesome dog
* Haddock
* A sea captain
* Has a fantastic beard
* Loves whiskey
Tables
Day | Subject | Time |
---|---|---|
Monday | C# | 2h |
Tuesday | Powershell | 1h |
Syntax Highlight
A code block by indentation with four spaces
Code Block
more code
Alternatively, you can use 3 backtick quote marks before and after the block, like this:
```
This is a code block
```
This is a code block
To add syntax highlighting to a code block, add the name of the language immediately after the backticks:
```csharp
```
public Task<string> GetValueAsync(int key)
{
string result;
if (cache.TryGetValue(key, out result))
return Task.FromResult(result);
return DoGetValueAsync(key);
}
Inline code characters
Use the backtick to refer to a `function()`.
Use the backtick to refer to a function()
.
Escaping
Backslash (\) escapes the following characters:
\ ` * _ { } [ ] ( ) # + - . !
\*this text is surrounded by literal asterisks*\