This document is a Markdown quick reference. It is by no means a comprehensive tutorial on Markdown, but rather just some of the most common Markdown tags to serve as a reminder.
You can view this using one of the Markdown preview tools, just be aware somethings won't work quite right, such as the Image and YouTube sections, as they point to items that do not exist.
Markdown comments can be done in two ways. First is the markdown syntax:
[//]: # (Here is my comment)
You can also give the comment a name/id
[comment]: # (Here is another comment)
The second method is with HTML
Embedding blank linkes To embed a blank line (extra space) in a document, you have to resort to HTML
Or you can use the html line break.
<br>
# H1
## H2
### H3
#### H4
##### H5
###### H6
Italics: _word_
becomes word (can also use a single *)
Bold: **word**
becomes word (can also use a double underscore __)
Strikethru: ~~word~~
becomes word
If you need to use these characters, you can do so by escaping them.
\*this won't be italisized*
becomes
*this won't be italisized*
* Unordered list can use asterisks
- Or minuses
+ Or pluses
Nested lists can be setup.
+ Item 1
+ Item 2
+ Item 3
- Item 3.1
- Item 3.2
+ Item 4
+Item 5
Renders as:
- Item 1
- Item 2
- Item 3
- Item 3.1
- Item 3.2
- Item 4 +Item 5
You can embed images in one of two ways. The first uses pure markdown, but doesn't allow you to resize the image. (Note the image file names are case sensitive).
![Image Name](Images/myimage.jpg)
If you need to resize the image, you can use the HTML IMG tag.
<img src="Images/myimage.jpg" width=320 height=240 alt="my image goes here">
You can just paste in URL in which case markdown will make it a link
This will display the text in brackets, but link to the URL in parens
[Inline link](http://arcanecode.me)
This will do the same but add a title
[Inline link](http://arcanecode.me "Arcane's Page")
Can also have relative links
[Link to another file](../path/theotherfile.html)
You can setup links to specific spots inside your document. To do so use the <a>
tag for the anchor, and a #
in the link.
### Some links
* [Jump 1](#jump_1)
* [Jump 2](#jump_2)
* [Jump 3](#jump_3)
Here's the anchors:
### Jump point 1 <a name="jump_1"></a>
Some content here
### Jump point 2 <a name="jump_2"></a>
More content here
Anchors don't have to be in a header, it can be anywhere.
Footnote 3 <a name="jump_3"></a>
Try it out here:
Some content here
More content here
Anchors don't have to be in a header, it can be anywhere.
Anchors can also go backwords. For example you could use code like this to jump back to the top of a section.
[Back to Anchors](#anchors)
Not all parsers support footnotes, but many do. For example, the markdown extension here in Visual Studio does, but the markdown engine in GitHub does not.
To do a footnote, use a square bracket, caret, then the footnote number, such as [^1]
.
Some text with a [^1] footnote
[^1]: Even though this footnote is right under the reference, you won't see it unless you jump to the bottom of the document.
Please note that no matter where you place the footnote in the document, the markdown engine will place it at teh very bottom of the document.
Try it out:
Some text with a 1 footnote
Inline code is surrounded with single backticks
Here the variable `$myVar` is used to do fun things.
Renders as:
Here the variable $myVar
is used to do fun things.
Code blocks use three backticks ```
before and after the code.
Anything here gets ignored **this ain't bold** including markdown. It simply highlights in in gray.
To enable syntax highlighting, put the language name after the last backtick on the first line.
$path = '/home/documents/'
Get-ChildItem $path
Use vertical bars to divide columns. Colons can be used to align columns. A colon on both sides indicates it should be centered, on the right side then it will be right aligned. No colon defaults to left aligned.
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
Renders to:
Tables | Are | Cool |
---|---|---|
col 3 is | right-aligned | $1600 |
col 2 is | centered | $12 |
zebra stripes | are neat | $1 |
Note there must be at least three dashes for each header cell. Also, the opening and closing vertical bar are optional, but look much nicer.
Block quotes can be used to emulate a side note or what you might see in email. It produces the text in a light font (by default dark gray) on a colored background (default is a light gray). Use > to create a block quote. You can use multiple > to indent block quotes.
> Some text to block quote
>> Here's the __indented__ quote
Some text to block quote
Here's the indented quote
You can also embed markdown inside the block quote, as the above example shows with the word second bolded.
You can embed HTML inside markdown, and for the most part it renders well.
You can add a horizontal rule in one of three ways. Use three Hyphens, Asterisks, or Underscores. Be sure to put a blank line before and after the horizontal line or it will adversely affect the text around it.
---
***
___
All become:
They can't be added directly but you can add an image with a link to the video like this:
<a name="http://www.youtube.com/watch?feature=player_embedded&v=YOUTUBE_VIDEO_ID_HERE
" target="_blank"><img src="http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg"
alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" /></a>
Or, in pure Markdown, but losing the image sizing and border:
[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE)
Robert C. Cain | @ArcaneCode | [email protected]
About Me: http://arcanecode.me
Blog: http://arcanecode.com
Github: http://arcanerepo.com
LinkedIn: http://arcanecode.in
This document is Copyright (c) 2020 Robert C. Cain. All rights reserved.
The code samples herein is for demonstration purposes. No warranty or guarantee is implied or expressly granted.
This document may not be reproduced in whole or in part without the express written consent of the author and/or Pluralsight. Information within can be used within your own projects.
Footnotes
-
Even though this footnote is right under the reference, you won't see it unless you jump to the bottom of the document. ↩