Markdown is a lightweight markup language that makes it easy to format text. It’s used widely across many platforms like GitHub, Dev.to, and more for creating well-structured documents, from README files to blogs and even documentation.
In this tutorial, I’ll walk you through the essentials of Markdown—from basic syntax to advanced formatting techniques that will help you create more professional and visually engaging content.
Table of Contents
Basic Markdown Syntax
Intermediate Features
Advanced Markdown
Basic Markdown Syntax
- Headings (L1-L6)
# Bangladesh
## Bangladesh
### Bangladesh
#### Bangladesh
##### Bangladesh
###### Bangladesh
This will display as:
Bangladesh
Bangladesh
Bangladesh
Bangladesh
Bangladesh
Bangladesh
- Paragraphs
To create paragraphs, just write text on a new line. You don’t need to add any special syntax—just hit "Enter" twice for spacing between paragraphs.
_italic_ or _italic_
**bold** or **bold**
This will display as:
Bangladesh
Bangladesh
- Blockquotes
> Respect for my Country
This will display as:
Respect for my Country
-
Lists
- Unordered List:
- Item 1
- Item 2
- Sub-item 1
- Sub-item 2
This will display as:
- Item 1
-
Item 2
- Sub-item 1
- Sub-item 2
- Ordered List:
1. First item
2. Second item
This will display as:
- First item
- Second item
- Hyperlink
[Google](http://google.com)
This will display as:
- Images
![Github](https://github.blog/wp-content/uploads/2024/07/github-logo.png)
This will display as:
Hyperlink and Images both syntax are same expect one exclamation mark (!) which is point beginning of the Images tag.
Intermediate Features
- Code Blocks & Syntax Highlighting
For Single Line Code (between single backticks ‘‘):
`print("Hello Bangladesh!")`
This will display as:
print("Hello Bangladesh!")
For multi-line code blocks( between triple backticks ‘‘‘‘‘‘):
```
python
def hello_bangladesh():
print("Hello Bangladesh!")
```
This will display as:
def hello_bangladesh():
print("Hello Bangladesh!")
- Tables
| Header 1 | Header 2 |
| -------- | -------- |
| Row 1 | Data 1 |
| Row 2 | Data 2 |
This will display as:
Header 1 | Header 2 |
---|---|
Row 1 | Data 1 |
Row 2 | Data 2 |
- Horizontal Lines
---
This will display as:
Advanced Markdown
- Escaping Characters
\# Not a heading
This will display as:
# Not a heading
- Task Lists
- [x] Task 1
- [ ] Task 2
This will display as:
- [x] Task 1
- [ ] Task 2
- Nested Lists
1. Item 1
- Sub-item 1
- Sub-item 2
2. Item 2
- Sub-item 1
- Sub-item 2
This will display as:
- Item 1
- Sub-item 1
- Sub-item 2
- Item 2
- Sub-item 1
- Sub-item 2
- Markdown in HTML
<h2>Custom HTML Header</h2>
<p>This is a paragraph with <strong>bold</strong> text.</p>
This will display as:
Custom HTML Header
This is a paragraph with bold text.
This allows for greater flexibility, especially if you're embedding media or using specific styles.
Website where you can practices markdown live
MarkdownLivePreview
Don’t wait for the perfect moment to learn Markdown. The power to simplify and enhance your writing is already within your reach. Start today, and watch how this simple tool transforms the way you create, share, and collaborate.
Remember: great content starts with a solid foundation—and that foundation is Markdown.
To everyone who has taken the time to read this post—thank you! I hope this Markdown tutorial has empowered you to take the next step in your journey, whether you're a beginner or someone looking to polish their skills. Remember, learning is a continuous process, and even small steps lead to great achievements.
As you venture into new projects, may you find inspiration and joy in everything you create. Whether you're crafting code, writing blogs, or documenting your ideas, may your path be filled with success, creativity, and growth. Keep pushing boundaries, exploring new horizons, and never stop learning!
Wishing you all the best in your endeavors—let’s keep creating amazing things together!
Top comments (17)
Once you master markdown you will use it everywhere. Buty of it is plain text formated so it can display almost everywhere, even if it is displayed as plain text you will like the style. I use it mostly for note taking and readme files.
Thanks for sharing how you use it—glad to hear from a fellow Markdown fan!
Some of the code block are no displaying properly, ex: Horizontal Lines
`markdown
Thanks for the heads-up! It’s strange because the code blocks are displaying correctly on other platforms and even on Markdown viewers. I’ll look into why it’s not working here—it might be a platform-specific formatting issue. Appreciate your patience and feedback!
Already Fixed this issue.
Add also Github TOC
Already Added. Thanks Again
Great suggestion! I'll add a section on creating a TOC for GitHub soon. Thanks for the idea—stay tuned!
This is a fantastic overview of Markdown! I especially appreciate the clear examples and the breakdown of advanced features like code blocks and tables. This tutorial is a great resource for anyone wanting to learn Markdown.
Thank you! 😊 I'm glad you found the tutorial helpful! Let me know if there's anything specific you'd like to see in future Markdown tips.
Thanks for putting this together! Markdown is a great tool with a lot of capabilities, but the different versions create variations and ambiguities in the spec. This in turn creates headaches like the ones with your code examples.
Because of the different versions and implementation inconsistency I recommend adding two resources to your markdown arsenal:
Thank you for the valuable feedback! 😊 You’re absolutely right—Markdown’s different versions can cause inconsistencies, which can be frustrating. Thanks again for sharing these great resources!
Wonderfully written and researched!
Thanks for checking it out! Let me know if there’s anything specific you’d like me to cover next time!
I have liked your writing.
I am from Bangladesh too. I am glad to be a part of the community.
Thank you so much brother! 😊 Glad to have you in the community—let’s keep learning and growing together!
Much appreciated.