Blockquote element: Difference between revisions
fixed broken W3C link |
→top: "mediawiki" is unsourced and I'm pretty sure it just uses browser-side rendering |
||
(25 intermediate revisions by 23 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 [[MOS:Blockquote]]}} |
|||
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 |
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><blockquote><p>blockquoted text goes here</p></blockquote></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, but this may be overridden by [[Cascading Style Sheets]] (CSS) |
||
⚫ | 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 |
||
⚫ | 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 |
Related [[HTML element]]s include the <code><q></code> and <code><cite></code> tags for shorter, probably in-line, [[quotations]] and for [[citations]] respectively. An [[HTML attribute]] specific to the <code><blockquote></code> and <code><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><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). |
In many [[Wiki]] [[Wikitext|markup languages]], the semantics and effect of HTML <code><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). |
||
Line 21: | Line 22: | ||
== External links == |
== External links == |
||
*[ |
*[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 tags]] |
[[Category:HTML tags]] |
||
[[Category:HTML]] |
|||
[[Category:Quotations]] |
[[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]- ^ "4.4.4 The blockquote element — HTML5". World Wide Web Consortium. Retrieved 11 November 2015.
- ^ HTML definition of ‘blockquote’