Skip to content

Markdown Blockquotes

Blockquotes are used to quote others' words, highlight important information, or create special content areas. This chapter will detail various uses of blockquotes.

Basic Syntax

Use the > symbol to create blockquotes:

markdown
> This is a blockquote text.

Effect:

This is a blockquote text.

Multi-line Quotes

Continuous Quotes

Use > on each line:

markdown
> First line of quote.
> Second line of quote.
> Third line of quote.

Effect:

First line of quote. Second line of quote. Third line of quote.

Paragraph Quotes

Quotes containing multiple paragraphs:

markdown
> First paragraph of quote.
>
> Second paragraph of quote.

Effect:

First paragraph of quote.

Second paragraph of quote.

Nested Quotes

Use multiple > to create nested quotes:

markdown
> First level quote
>> Second level quote
>>> Third level quote

Effect:

First level quote

Second level quote

Third level quote

Practical Application

markdown
> Original text:
>> This is the quoted content.
>
> My comment: This point makes sense.

Other Elements in Quotes

Headings in Quotes

markdown
> ## Quote Heading
>
> This is quote content.

Effect:

Quote Heading

This is quote content.

Lists in Quotes

markdown
> List in quote:
>
> - Item one
> - Item two
> - Item three

Effect:

List in quote:

  • Item one
  • Item two
  • Item three

Code in Quotes

markdown
> Use the following command:
>
> ```bash
> npm install
> ```

Effect:

Use the following command:

bash
npm install
markdown
> For more information visit [official documentation](https://example.com).

Effect:

For more information visit official documentation.

Quote Styles

Warning Box

markdown
> ⚠️ **Warning**
>
> This is a warning message, please pay attention!

Effect:

⚠️ Warning

This is a warning message, please pay attention!

Tip Box

markdown
> 💡 **Tip**
>
> This is a helpful tip.

Effect:

💡 Tip

This is a helpful tip.

Note Box

markdown
> ⚡ **Note**
>
> This is content that needs special attention.

Effect:

Note

This is content that needs special attention.

Info Box

markdown
> ℹ️ **Information**
>
> This is an information prompt.

Effect:

ℹ️ Information

This is an information prompt.

Quote Application Scenarios

1. Quote Famous Sayings

markdown
> "Life is like a box of chocolates, you never know what you're going to get."
>
> — Forrest Gump

Effect:

"Life is like a box of chocolates, you never know what you're going to get."

— Forrest Gump

2. Quote Literature

markdown
> Research shows that Markdown can improve writing efficiency by 30%.
>
> — Technical Writing Guide, 2024

3. Highlight Important Points

markdown
> **Important Tip**
>
> Please back up your data before performing this operation.

4. Code Comments

markdown
> **Note:** The following code only applies to Python 3.6+
>
> ```python
> def hello():
>     print("Hello, World!")
> ```

5. Version Notes

markdown
> **v2.0 New Features**
>
> - Dark mode support
> - Performance optimization
> - Fixed known issues

Custom Quote Styles

Use HTML and CSS

markdown
<blockquote style="border-left: 4px solid #42b983; padding-left: 1em; color: #42b983;">
This is a custom-styled blockquote.
</blockquote>

Use div Container

markdown
<div style="background-color: #f0f0f0; padding: 1em; border-radius: 5px;">
<strong>Tip:</strong> This is a custom tip box.
</div>

Quote Best Practices

1. Keep it Concise

markdown
✅ Recommended
> Short quotes are easier to read.

❌ Not Recommended
> This is a very very very very very very very very very very very very very very very very very very very long quote text.

2. Clearly Indicate Source

markdown
✅ Recommended
> "Knowledge is power."
>
> — Francis Bacon

❌ Not Recommended
> "Knowledge is power."

3. Use Nesting Appropriately

markdown
✅ Recommended
> Original
>> Quote

❌ Not Recommended
> Level 1
>> Level 2
>>> Level 3
>>>> Level 4 (too deep)

4. Blank Lines Before and After Quotes

markdown
✅ Recommended
This is the main text.

> This is a quote.

This is the main text.

❌ Not Recommended
This is the main text.
> This is a quote.
This is the main text.

Special Quote Formats

GitHub Style Alerts

Some platforms support special alert syntax:

markdown
> [!NOTE]
> This is a note.

> [!TIP]
> This is a tip.

> [!IMPORTANT]
> This is important information.

> [!WARNING]
> This is a warning message.

> [!CAUTION]
> This requires caution.

VitePress Style Alerts

markdown
::: tip
This is a tip
:::

::: warning
This is a warning
:::

::: danger
This is a danger warning
:::

::: info
This is information
:::

Quotes Combined with Other Elements

Quotes + Task Lists

markdown
> **Todo Items**
>
> - [x] Complete documentation
> - [ ] Code review
> - [ ] Deployment

Quotes + Tables

markdown
> **Configuration Parameters**
>
> | Parameter | Description | Default |
> |-----------|-------------|---------|
> | port | Port number | 3000 |
> | host | Host address | localhost |

Quotes + Images

markdown
> **Preview**
>
> ![Preview image](image.png)

Semantic Use of Quotes

Quote Others' Opinions

markdown
> As Einstein said: "Imagination is more important than knowledge."

Quote Document Content

markdown
> According to official documentation:
>
> Markdown is a lightweight markup language.

Highlight Important Information

markdown
> ⚠️ **Important**
>
> This operation cannot be undone, proceed with caution.

Supplementary Notes

markdown
> **Additional Note**
>
> This feature was introduced in version 2.0.

Common Questions

Space After Quote Symbol

It's recommended to add a space after >:

markdown
✅ Recommended
> Quote content

❌ Not Recommended
>Quote content

Blank Lines in Quotes

Blank lines in quotes also need >:

markdown
✅ Recommended
> First paragraph
>
> Second paragraph

❌ Not Recommended
> First paragraph

> Second paragraph

End of Quote

A blockquote ends with a blank line:

markdown
> This is a quote

This is the main text

Practice Exercises

Try creating the following quotes:

  1. A simple blockquote
  2. A quote containing multiple paragraphs
  3. A nested quote
  4. A quote containing a list
  5. A warning-style quote box

Quote Shortcuts

VS Code

  • Select text, then search "Toggle Block Comment" in command palette

Typora

  • Ctrl/Cmd + Shift + Q: Create blockquote

Obsidian

  • Ctrl/Cmd + <: Create blockquote

Summary

Blockquotes are important formatting tools in Markdown that can be used for:

  • Quoting others' words and opinions
  • Highlighting important information and warnings
  • Creating special content areas
  • Improving document readability

Using blockquotes properly can make your documents clearer and more professional.

Next: Learn detailed usage of Markdown Code.

Content is for learning and research only.