How to block quote in markdown
To do a block quote in markdown all we need to do is add a greater than symbol >
followed by a spacebar before the text like so:
This is
> a block quote
which will give us the following:
a block quote
Most text editors (MDTX included) achieve the same via a greater than >
button. When pressed it will add a > and a spacebar into your text so that you can simply start writing the quote from there.
You can also do nested block quotes by simply adding two greater-than symbols and a spacebar before the text in a new line:
This is a
> block quote.
> > nested block quote.
which will give us the following:
block quote.
nested block quote.
You can also use other markdown elements in blockquotes like headers, lists and code blocks like so:
Header
- list one
- list two
and a (colored!) code block:
def greet(name): print(f"Hello, {name}!") greet("World")