Jump to content

Blockquote element: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m →‎References: convert to reflist
→‎top: "mediawiki" is unsourced and I'm pretty sure it just uses browser-side rendering
 
(41 intermediate revisions by 30 users not shown)
Line 1: Line 1:
{{About|the HTML element|the text quotation style|block quotation}}
{{About|the HTML element|the text quotation style|block quotation}}
{{Selfref|For Wikipedia's blockquote guideline, see [[Wikipedia:MOSQUOTE]]}}


In [[HTML]] and [[XHTML]], the '''blockquote''' [[HTML element|element]] defines a [[block-quote|block quotation]] within the text. The syntax is <code>&lt;blockquote&gt;&lt;p&gt;blockquoted text goes here&lt;/p&gt;&lt;/blockquote&gt;</code>.
In [[HTML]] and [[XHTML]], the '''blockquote''' [[HTML element|element]] defines "a section [within a document] that is quoted from another source".<ref name="HTM5-def">{{cite web|url=http://www.w3.org/TR/html5/grouping-content.html#the-blockquote-element|title=4.4.4 The blockquote element — HTML5|work=[[World Wide Web Consortium]]|accessdate=11 November 2015}}</ref> The syntax is


<code>&lt;blockquote&gt;&lt;p&gt;blockquoted text goes here&lt;/p&gt;&lt;/blockquote&gt;</code>.
The <code>blockquote</code> 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.


The non-semantic use of the <code>blockquote</code> element purely to indent text is deprecated by the W3C ([[World Wide Web Consortium]]) in the current (1999) HTML 4.01 Specification,<ref>[http://www.w3.org/TR/html401/struct/text.html#edef-BLOCKQUOTE HTML definition of ‘blockquote’]</ref> which is also the basis for XHTML 1.0. The preferred approach is the use of CSS ([[Cascading Style Sheets]]).
The <code>blockquote</code> 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, but this may be overridden by [[Cascading Style Sheets]] (CSS).

The non-semantic use of the <code>blockquote</code> element purely to indent text has been deprecated by the W3C ([[World Wide Web Consortium]]) since HTML 4.<ref>[http://www.w3.org/TR/html401/struct/text.html#edef-BLOCKQUOTE HTML definition of ‘blockquote’]</ref> The preferred approach is the use of [[CSS]].


==Usage==
==Usage==
Related (X)[[HTML element]]s include the <code>&lt;q></code> and <code>&lt;cite></code> elements for shorter, probably in-line, [[quotations]] and for [[citations]] respectively. An (X)HTML attribute specific to the <code>&lt;blockquote></code> and <code>&lt;q></code> elements is <code>cite=</code> where the provenance of the material quoted may be given. If the quotation is in a language other than that of the main document, <code>lang=</code> and maybe <code>dir=</code> attributes may be relevant to specify the language of the quoted text and perhaps its direction, left-to-right or right-to-left.
Related [[HTML element]]s include the <code>&lt;q></code> and <code>&lt;cite></code> tags for shorter, probably in-line, [[quotations]] and for [[citations]] respectively. An [[HTML attribute]] specific to the <code>&lt;blockquote></code> and <code>&lt;q></code> tags is <code>cite=</code> where the provenance of the material quoted may be given. If the quotation is in a language other than that of the main document, <code>lang=</code> and maybe <code>dir=</code> attributes may be relevant to specify the language of the quoted text and perhaps its direction, left-to-right or right-to-left. <code>class=</code> may be used for semantic or styling purposes.

==Relationship to some wiki markup and usage==
In many [[Wiki]] [[Wikitext|markup languages]], the semantics and effect of HTML <code>&lt;blockquote></code> is different from the use of an initial colon in a paragraph, which may be translated into an HTML <code>dd</code> element enclosed within a <code>dl</code> element. (That is a "data definition" within a "definition list", without there being any preceding "data term" or <code>dt</code> element).


== See also ==
===Relationship to some wiki markup and usage===
* [[Block quotation]]
In many [[Wiki]] [[Wikitext|markup languages]], the semantics and effect of HTML <code>&lt;blockquote></code> is different from the use of an initial colon in a paragraph, which may be translated into an HTML <code>dd</code> element enclosed within a <code>dl</code> element. (That is a ‘data definition’ within a ‘definition list’, without there being any preceding ‘data term’ or <code>dt</code> element).


==References==
==References==
Line 18: Line 22:


== External links ==
== External links ==
*[http://www.w3.org/TR/html4/struct/text.html#h-9.2.2 W3C]
*[https://www.w3.org/TR/html4/struct/text.html#h-9.2.2 W3C]
*[https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote MDN]
*[https://www.w3schools.com/tags/tag_blockquote.asp W3Schools]


[[Category:HTML]]
[[Category:HTML tags]]
[[Category:Quotations]]

Latest revision as of 01:10, 23 February 2024

In HTML and XHTML, the blockquote element defines "a section [within a document] that is quoted from another source".[1] The syntax is

<blockquote><p>blockquoted text goes here</p></blockquote>.

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, but this may be overridden by Cascading Style Sheets (CSS).

The non-semantic use of the blockquote element purely to indent text has been deprecated by the W3C (World Wide Web Consortium) since HTML 4.[2] The preferred approach is the use of CSS.

Usage

[edit]

Related HTML elements include the <q> and <cite> tags for shorter, probably in-line, quotations and for citations respectively. An HTML attribute specific to the <blockquote> and <q> tags is cite= where the provenance of the material quoted may be given. If the quotation is in a language other than that of the main document, lang= and maybe dir= attributes may be relevant to specify the language of the quoted text and perhaps its direction, left-to-right or right-to-left. class= may be used for semantic or styling purposes.

Relationship to some wiki markup and usage

[edit]

In many Wiki markup languages, the semantics and effect of HTML <blockquote> is different from the use of an initial colon in a paragraph, which may be translated into an HTML dd element enclosed within a dl element. (That is a "data definition" within a "definition list", without there being any preceding "data term" or dt element).

See also

[edit]

References

[edit]
  1. ^ "4.4.4 The blockquote element — HTML5". World Wide Web Consortium. Retrieved 11 November 2015.
  2. ^ HTML definition of ‘blockquote’
[edit]