1. Technology

What is a Blockquote?


Question: What is a Blockquote?

Blockquote is an HTML tag used to define long quotations. According to the W3C HTML5 specification:

The blockquote element represents a section that is quoted from another source.

When you're writing text in a web page, you sometimes want to call out a block of text as a quotation. In publishing this is sometimes called a pull-quote, and in web design it's called a blockquote.

You use the blockquote tag to define long quotations, such as this excerpt from “The Jabberwocky” by Lewis Carroll:

'Twas brillig and the slithey toves
Did gyre and gimble in the wabe:
All mimsy were the borogoves,
And the mome raths outgrabe.

(by Lewis Carroll)

Using the Blockquote Tag

The blockquote tag is a semantic tag that tells the browser or user agent that the contents are a long quotation. As such, you should not enclose text that is not a quotation inside the blockquote tag.

Most web browsers add some indenting (about 5 spaces) to both sides of the quotation to make it stand out from the surrounding text. Some extremely old browsers may even render the quoted text in italics. But you should not rely on the formatting of any browser, and instead style the blockquote with CSS.

To add the blockquote tag to your text, simply surround the text that is a quotation with <blockquote></blockquote> For example:

  ’Twas brillig and the slithey toves<br/>
  Did gyre and gimble in the wabe:<br/>
  All mimsy were the borogoves,<br/>
  And the mome raths outgrabe.

Do Not Use Blockquote to Indent Text

If you need to indent your text, you should use style sheets. Try putting this code in your web page:

<p style="margin : 0 10px 0 10px;">
This paragraph has been indented 10 px on the right and left.

You should only indent text using the margin CSS style property.

©2014 About.com. All rights reserved.