HTML <blockquote> tag
To quote a block of text from another source, you can use the <blockquote> in HTML5.
In HTML4, you should use the <blockquote> element to to format a long quote text in a section.
Normally, it is also intended more (i.e. the content starts after some initial space) than its surrounding text.
Syntax:
<blockquote>Text….</blockquote>
Example
<blockquote cite="https://en.wikipedia.org/wiki/Blockquote_element"> The blockquote element is used to indicate the quotation of a large section of text from another source. Using the default HTML styling of most web browsers, it will indent the right and left margins both on the display and in printed form </blockquote>
Default CSS Values
display: block;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 40px;
margin-right: 40px;
How Browser will display
BLOCK Level.
Difference between HTML4.01, XHTML and HTML5
HTML4 | XHTML | HTML5 |
---|---|---|
In HTML4.01 <blockquote> tag specifies a long quotation | It should contain only block elements | In HTML5 <blockquote> tag defines a block of text to quoate from other source |
Attributes used with <blockquote> tag
Attribute | Description |
---|---|
cite | To include the source URL of the quoted text of section. |
Note/Warning/Info Normally, you should use the <blockquote> for long text of quotations. This is block level element.
For small text of quotation, you should consider using the <q> tag or <cite> tag. Both these tags are inline elements.
For small text of quotation, you should consider using the <q> tag or <cite> tag. Both these tags are inline elements.
Global Attributes
The <blockquote> tag supports Global attributes.
Event Attributes
The <blockquote> tag supports Event attributes.
Supporting Browsers
Related Tags
<q> & <cite> tags.