Markdown Syntax - Complete Tutorial
Overview
Complete Tutorial Of Markdown Syntax
Markdown is a method of writting and representing data in a beautiful way. It's widely used for creating documentation, README files, Blogs, and other types of content on the web. In this tutorial, we'll cover the basic syntax of Markdown in simple words.
1. Headings
To create headings, use hash symbols (#). Use hash as per your heading level.
2. Text Formatting
Bold Text:
Surround the text with double asterisks or double underscores.
1**Bold Text**
2__Bold Text__
Output:
Bold Text Bold Text
Italic Text:
Surround the text with single asterisks or single underscores.
1*Italic Text*
2_Italic Text_
Output:
Italic Text Italic Text
3. Lists
Unordered Lists: Use asterisks, plus signs, or hyphens.
1* Item 1
2+ Item 2
3- Item 3
Output:
- Item 1
- Item 2
- Item 3
List with ordered elements: Use numbers for numbering element of list.
11. Item 1
22. Item 2
33. Item 3
Output:
- Item 1
- Item 2
- Item 3
4. Links
Create links by enclosing the link text in square brackets and the URL in parentheses.
1[Gitesh Wagh](https://www.giteshwagh.com)
Output:
5. Images
Insert images similarly to links, but with an exclamation mark in front.
1![Alt Text For Image](image.png)
OR
1<img title="Markdown Synatx Example" alt="Markdown Synatx Example" src="/images/Image.png">
Output:
6. Blockquotes
Use the greater-than symbol for blockquotes.
1> This is a blockquote.
Output:
This is a blockquote.
7. Code
Inline code is wrapped in backticks.
1```inline code```
Output -
1inline code
For code blocks, use three backticks (```), optionally followed by the programming language.
eg.
1def example():
2print("Hello, Markdown!")
8. Horizontal Rules
Insert a horizontal rule with three hyphens, underscores, or asterisks.
1---
OR
1***
OR
1___
9. Escaping Characters
To display special characters, use a backslash.
1\*Using Special Character\*
Output: *Using Special Character*
10. Tables
Create tables using pipes and hyphens.
1| Heading 1 | Heading 2 |
2| --------- | --------- |
3| Content 1 | Content 2 |
Output -
Heading 1 | Heading 2 |
---|---|
Content 1 | Content 2 |