# A Comprehensive Guide to Markdown Formatting
![[markdown.png]]
Markdown is a lightweight markup language designed for easy formatting of text documents, particularly for web-based content such as blogs, documentation, and README files. In this post, we'll explore the different ways you can format text in Markdown, complete with examples.
---
## Headings
Markdown uses `#` symbols to create headings. The number of `#` symbols corresponds to the heading level.
### Example:
```markdown
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
```
**Rendered Output:**
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
---
## Emphasis (Bold and Italics)
You can add emphasis to text using `*` or `_` for italics and `**` or `__` for bold.
### Example:
```markdown
*Italic text*
_Italic text_
**Bold text**
__Bold text__
***Bold and Italic text***
___Bold and Italic text___
```
**Rendered Output:**
*Italic text*
_Italic text_
**Bold text**
__Bold text__
***Bold and Italic text***
___Bold and Italic text___
---
## Lists
### Unordered Lists
Use `-`, `*`, or `+` followed by a space to create unordered lists.
#### Example:
```markdown
- Item 1
- Item 2
- Sub-item 2a
- Sub-item 2b
* Item A
* Item B
+ Item X
+ Item Y
```
**Rendered Output:**
- Item 1
- Item 2
- Sub-item 2a
- Sub-item 2b
* Item A
* Item B
+ Item X
+ Item Y
### Ordered Lists
Use numbers followed by a period to create ordered lists.
#### Example:
```markdown
1. First item
2. Second item
1. Sub-item 2a
2. Sub-item 2b
3. Third item
```
**Rendered Output:**
1. First item
2. Second item
1. Sub-item 2a
2. Sub-item 2b
3. Third item
---
## Links
You can create hyperlinks using the following syntax:
#### Example:
```markdown
[OpenAI](https://openai.com)
```
**Rendered Output:**
[OpenAI](https://openai.com)
---
## Images
To embed an image, use the `![]()` syntax.
#### Example:
```markdown

```
**Rendered Output:**

---
## Blockquotes
Use `>` to create blockquotes.
#### Example:
```markdown
> This is a blockquote.
>
> It can span multiple lines.
```
**Rendered Output:**
> This is a blockquote.
>
> It can span multiple lines.
---
## Code Blocks and Inline Code
### Inline Code
Use backticks `` ` `` to create inline code.
#### Example:
```markdown
This is `inline code` inside a sentence.
```
**Rendered Output:**
This is `inline code` inside a sentence.
### Code Blocks
Use triple backticks or indent code with four spaces for larger blocks.
#### Example:
```markdown
```
function helloWorld() {
console.log("Hello, World!");
}
```
```
**Rendered Output:**
```
function helloWorld() {
console.log("Hello, World!");
}
```
---
## Horizontal Rules
Use three dashes `---`, three underscores `___`, or three asterisks `***` to create horizontal rules.
#### Example:
```markdown
---
___
***
```
**Rendered Output:**
---
___
***
---
## Tables
You can create tables using pipes `|` and dashes `-`.
#### Example:
```markdown
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Data 1 | Data 2 | Data 3 |
| Data 4 | Data 5 | Data 6 |
```
**Rendered Output:**
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Data 1 | Data 2 | Data 3 |
| Data 4 | Data 5 | Data 6 |
---
## Task Lists
You can create checklists using `- [ ]` for unchecked items and `- [x]` for checked items.
#### Example:
```markdown
- [ ] Task 1
- [x] Task 2 (completed)
```
**Rendered Output:**
- [ ] Task 1
- [x] Task 2 (completed)
---
## Escaping Characters
If you need to display special characters as plain text, use a backslash `\` before them.
#### Example:
```markdown
This is how you show a literal \\, \`code\`, or **bold** without formatting.
```
**Rendered Output:**
This is how you show a literal `\`, `code`, or **bold** without formatting.
---
## Conclusion
Markdown is a simple yet powerful formatting tool that makes writing content for the web easy and efficient. Whether you're creating documentation, writing a blog, or formatting a README file, these Markdown techniques will help you structure and present your content effectively.
Happy writing!
[[Obsidian as a PKM]]
[[Obsidian Quick Add]]
[[Mastering Obsidian-Transforming Note-Taking into an Art]]
[[Harnessing Efficiency with Obsidian Tasks-The Complete Guide]]
[[Advice for someone stuck with Obsidian and Omnifocus]]
[[Data Backup]]
[[The Daily Note]]
[[Training]]
[[Support]]
[[Setup]]
[[PKM]]
[[The Tech Pastor|home]] ◦ [[Contact]]