Jump to content

Blockquote element: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
removed Category:HTML using HotCat
top: "mediawiki" is unsourced and I'm pretty sure it just uses browser-side rendering
 
(11 intermediate revisions by 10 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
Line 11: Line 10:


==Usage==
==Usage==
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.
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==
==Relationship to some wiki markup and usage==

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]