Markdown - Blockquotes

This tutorial covers Markdown format with examples. It convers syntax and examples for nested,multiple lines,paragraphs,line return,include Formatting styles(bold,italic,emphasis,strikethrough,codeblock).

Syntax and example

Blockquotes allows to have a part of content from other source link.This looks like similar to reply email text. These can be created using prefix Greater than > symbol to the line. After symbol, Optional space is required.

> This is blockquote text

Generated Html

<blockquote>
    <p>This is blockquote text</p>
</blockquote>

and Rendered output

This is blockquote text

Nested blockquotes

blockquotes can be inside other blockquotes, called nested. These can be represented by >> symbol at starting of the line or paragraph

> This is blockquote text
> This is second line of text
>> This is nested blockquotes content

and output displayed on browser is

This is blockquote text This is indent space text

This is nested blockquotes content

blockquotes with multiple lines of text

These can contain multiple lines or paragraph by adding ‘>’ symbol with empty line

> line one text1
> 
>This is paragraph text2

output is

line one text1

This is paragraph text2

paragraph with multiple lines

> This is blockquote example of writing multiple lines in a single paragraph.
  This is very useful in quoting your text

Output is

This is blockquote example of writing multiple lines in a single paragraph. This is very useful in quoting your text

can contain formatted elements

blockquotes can contain other markdown elements.

Following example contain formatted styles.

  • Headings
  • Emphasis bold,italic
  • Strikethrough
  • Code block
> #### Heading in blockquotes text
> **bold text**
> _italic text_
> ~~strikethrough text~~
> `code element`

Output

Heading in blockquotes text

bold text

italic text

strikethrough text

code element

Syntax highlight

programming code can be included in blockquotes. Following is a java program code inserted with syntax highlighter

> HelloWorld.java:
>
> ```java
> class HelloWorld {
>    public static void main(String[] args) {
>       System.out.println("Simple hello world program"); 
>   }
>}
> 

Output is

HelloWorld.java:

class HelloWorld {
   public static void main(String[] args) {
      System.out.println("Simple hello world program"); 
  }
}