Getting Started with Basic Markdown Syntax
Markdown is a lightweight markup language used to format text using simple, readable characters. It’s widely used in documentation, README files, blogs, and platforms like GitHub, Stack Overflow, and static site generators.
This guide covers the essential Markdown syntax you need to start writing clean, structured content.
1. Headings
Use # symbols to create headings. The number of # determines the level.
Markdown# Heading 1 ## Heading 2 ### Heading 3 #### Heading 4# Heading 1 ## Heading 2 ### Heading 3 #### Heading 4
Output:
Heading 1
Heading 2
Heading 3
Heading 4
2. Paragraphs and Line Breaks
Just write text normally.
MarkdownThis is a paragraph. This is another paragraph.This is a paragraph. This is another paragraph.
To force a line break, add two spaces at the end of a line.
3. Bold and Italic Text
Markdown**Bold text** _Italic text_ **_Bold and italic_****Bold text** _Italic text_ **_Bold and italic_**
Bold text Italic text Bold and italic
4. Lists
Unordered List
Markdown- Item 1 - Item 2 - Subitem- Item 1 - Item 2 - Subitem
- Item 1
- Item 2
- Subitem
Ordered List
Markdown1. First 2. Second 3. Third1. First 2. Second 3. Third
- First
- Second
- Third
5. Links
Markdown[Visit Google](https://google.com)[Visit Google](https://google.com)
Output: Visit Google
6. Images
Markdown
Markdown displays an image like this:
7. Code
Inline Code
MarkdownUse `console.log()` to print output.Use `console.log()` to print output.
Use console.log() to print output.
Code Blocks
Use triple backticks:
jsfunction greet() { console.log("Hello, Markdown!"); }function greet() { console.log("Hello, Markdown!"); }
8. Blockquotes
Markdown> This is a blockquote.> This is a blockquote.
This is a blockquote.
9. Horizontal Line
Markdown------
10. Tables
Markdown| Name | Age | | ----- | --- | | John | 25 | | Alice | 30 || Name | Age | | ----- | --- | | John | 25 | | Alice | 30 |
| Name | Age | | ----- | --- | | John | 25 | | Alice | 30 |
11. Checklist (GitHub Flavored Markdown)
Markdown- [x] Task 1 - [ ] Task 2- [x] Task 1 - [ ] Task 2
- [x] Task 1
- [ ] Task 2
Final Thoughts
Markdown is simple, readable, and powerful. You can write structured content without complex HTML tags, making it ideal for documentation, blogs, and developer notes.
Start with these basics, and you’ll be comfortable writing Markdown in no time.