Hi everyone, here is the cheat sheet on basic syntax of Markdown. But before cheat sheet, first let quickly revise what is markdown and why it should be used!
What is Markdown??
Markdown is lightweight markup language which can be used to add formatting elements to plain text documents.
Why to use Markdown??
- Markdown is platform independent.
- Markdown file can be edited using any text-editor.
- Markdown can be used for everything. People use it to create websites, documents, notes, books, presentations, email messages, and technical documentation.
Cheat Sheet for Basic Syntax of Markdown.
Headings
To create headings in markdown use "#" (hash or pound) symbol before the text. You can use 1-6 number of pound signs before text to indicate the level of heading. Eg. For < h3 > you should use 3 pound signs before the text.
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### heading 5
###### Heading 6
Output
Note:- You can also create heading level 1 and 2 by adding any number of == and -- characters on the line below the text.
Heading 1
=
Heading 2
-
Output
Paragraphs
To create paragraphs, use a blank line to separate one or more lines of text.
Line Breaks
To create a line break or new line (< br >), end a line with two or more spaces, and then press enter.
Emphasis
You can emphasize the text by making it bold, italic or bold and italic.
Bold
To bold text, add two asterisks or underscores before and after a word or phrase. To bold the middle of a word add two asterisks without spaces around the letters.
**I am a bold sentence**
__I am also Bold__
I am a par**agra**ph.
Output
Italic
To italicize text, add one asterisk or underscore before and after a word or phrase. To italicize the middle of a word, add one asterisk without spaces around the letters.
*I am a italic sentence*
_I am also italic
I am a par*agra*ph.
Output
Bold and Italic
To bold and italic the text at the same time, add three asterisks or underscores before and after a word or phrase. To bold and italicize the middle of a word, add three asterisks without spaces around the letters.
*I am a italic sentence*
_I am also italic
I am a par*agra*ph.
Output
Blockquotes
To create a blockquote, add a > in front of a paragraph.
> BlockQuotes
> Multiple Paragraphs
Output
Lists
Used to organize items into ordered and unordered lists.
Ordered Lists
To create an ordered list, add line items with numbers followed by periods. The numbers don’t have to be in numerical order.
1. First item
2. Second item
3. Third item
4. Fourth item
Output
Unordered Lists
To create an unordered list, add dashes (-), asterisks (*), or plus signs (+) in front of line items. Indent one or more items to create a nested list.
* First item
* Second item
* Third item
* Fourth item
Output
Images
To insert image use the following syntax. ![Alternate text for image](url of image)
Links
To insert link use the following syntax. ![Text you want to appear as link](url of you want to visit when text is clicked)
[Google](https://google.com)
Horizontal Rules
To create a horizontal rule, use three or more asterisks (*), dashes (---), or underscores (___) on a line by themselves.
HI
***
Hii
---
Hiii
___
Output
So these are some basic elements which you can use in your markdown file.
Thank you for reading.