Introduction
Markdown is a lightweight markup language created by John Gruber in 2004. It is regarded as one of the most popular languages that is used to add formatting elements to text documents with easy and simple syntaxes. Markdown doesn't have tags to define the structure and the syntaxes are special characters with plain texts.
Why should we use Markdown?
It is used everywhere. Popular apps like Reddit and Github support it along with other desktop and web-based applications.
It can be used to create websites, documents, notes, books, presentations, and technical documentation.
You can create it on any device running any operating system.
It is future-proof. For example, If your application stops working at some point, you'll still be able to read the Markdown-formatted text using a text editing application.
It is extremely easy to learn and cover within 10 minutes.
Let's get Started
This Markdown Cheatsheet provides a quick overview of the basic Syntax elements.
1. Heading
Headings and Sub-Headings are the basic needs for any documentation. They give structure to the document. The syntax for headings starts with #
followed by a space. The first level of heading should have one # and so on.
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Here is the output of the above code snippet.
2. Bold, Italic, and Strikethrough
These text formattings are a necessity in every document. The Syntaxes for these text formattings are **bold text**
*italicized text*
~~strikethrough text~~
**bold**
*italic*
~~strikethrough~~
Here is the output of the above code snippet.
bold
italic
3. Fenced Block Code
This feature is for highlighting a block of code for technical documentation. The code block should be enclosed within three backticks ```
.
This is a code block from my recent blog, you can check it out here if you want to.
#paragraph{
color: #1f1f1f;
font-weight: bold;
font-size: 35px;
font-family: 'Open Sans';
background-color: #03C6C7;
display: inline-block
}
4. Code
This feature is to highlight a line of code and should be enclosed with single backticks ``
.
`Lorem ipsum dolor sit amet`
This is the output of the above code snippet.
Lorem ipsum dolor sit amet
5. Ordered List
Put 1.
and space for the ordered list.
1. First Item
1. Second Item
1. Third Item
Here is the output of the above code snippet.
First Item
Second Item
Third Item
6. Unordered List
To create an unordered list, just put `
and space as prefix.
- First Item
- Second Item
- Third Item
Here is the output of the above code snippet.
First Item
Second Item
Third Item
7. Blockquote
You can use the >
symbol with space as a prefix.
> Praesent lacinia nulla sed felis ornare, ac rhoncus justo tempus. Nunc posuere augue et porttitor placerat. Vivamus a consequat odio.
Here is the output of the above code snippet.
Praesent lacinia nulla sed felis ornare, ac rhoncus justo tempus. Nunc posuere augue et porttitor placerat. Vivamus a consequat odio.
8. Link
This feature is incorporated widely in documentation and blogs. The syntax is [Text](Link)
.
[Check out my previous blogs here](https://harshthakkar.hashnode.dev/)
Here is the output of the above code snippet.
Check out my previous blogs here
9. Image
The syntax of this feature is almost similar to linking a URL.
![alt text](image.jpg)
![Burger](https://assets.cntraveller.in/photos/60ba26c0bfe773a828a47146/4:3/w_1440,h_1080,c_limit/Burgers-Mumbai-Delivery.jpg)
Here is the output of the above code snippet.
10. Horizontal Rule
The syntax to get a horizontal line is by specifying three consecutive hyphens ---
.
---
Here is the output of the above code snippet.
There are more extended syntaxes of Markdown that consist of Table, Footnote, Heading ID, Definition List, Task List, Emoji, Highlight, Subscript, and Superscript. You can check them out here.