Difference between revisions of "Template:QuoteBox/doc"

From WikiCorporates
Jump to navigation Jump to search
m (Usage)
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
This template can be used for block quotations (long quotes set off from the main text). However, this use is not advised {{em|in articles}}. The [[Wikipedia:Manual of Style#Block quotations|Manual of Style guidelines for block quotations]] recommend formatting block quotations using the {{tlx|Quote}} template or the HTML <[[blockquote]]> element, for which that template provides a wrapper.
+
Copied from {{wpl|Template:Quote_box}}. The show/hide stuff doesn't work on Ahania.
 +
 
 +
This template can be used for block quotations (long quotes set off from the main text). However, this use is not advised {{em|in articles}}. The [[Wikipedia:Manual of Style#Block quotations|Manual of Style guidelines for block quotations]] recommend formatting block quotations using the {{Tlx|Quote}} template or the HTML <[[blockquote]]> element, for which that template provides a wrapper.
  
 
* Quotes work best when used with short sentences, and at the start or end of a section, as a hint of or to help emphasize the section's content.
 
* Quotes work best when used with short sentences, and at the start or end of a section, as a hint of or to help emphasize the section's content.
* For typical quotes, especially those longer than the rest of the paragraph in which they are quoted, {{tlx|Cquote}} provides a borderless quote with decorative quotation marks, and {{tlx|Quote frame}} provided a bordered quote. Both span the article width. (However, do not use {{tlx|Cquote}} for block quotations in articles.)
+
* For typical quotes, especially those longer than the rest of the paragraph in which they are quoted, {{Tlx|Cquote}} provides a borderless quote with decorative quotation marks, and {{Tlx|Quote frame}} provided a bordered quote. Both span the article width. (However, do not use {{Tlx|Cquote}} for block quotations in articles.)
* For very short quotes, {{tlx|Rquote}} (with decorative quotation marks) or {{tlx|QuoteBox}} (framed) can be used to set the quote off to either the right or left as in a magazine [[Sidebar (publishing)|sidebar]].  This can be effective on [[WP:ESSAY|essay]] pages and [[WP:WIKIPROJECT|WikiProject]] homepages.
+
* For very short quotes, {{Tlx|Rquote}} (with decorative quotation marks) or {{Tlx|QuoteBox}} (framed) can be used to set the quote off to either the right or left as in a magazine [[Sidebar (publishing)|sidebar]].  This can be effective on [[WP:ESSAY|essay]] pages and [[WP:WIKIPROJECT|WikiProject]] homepages.
  
 
== Usage ==
 
== Usage ==
For actual quotes, and poems, this template (a variant of {{tlx|Quote frame}}) can be used to present a title, quote, author, and source in a box such as that shown opposite, with options to customise its bordering, background, alignment and other aspects. The box itself is floating div, which, like images, can appear on the right or left or across the entire page.  Article text will wrap around the div in the first two cases. This is useful in articles that are short on images and need some graphic-like element, or where an important or interesting quote wants to be presented in a way that sets it off from the surrounding text.
+
For actual quotes, and poems, this template (a variant of {{Tlx|Quote frame}}) can be used to present a title, quote, author, and source in a box such as that shown opposite, with options to customise its bordering, background, alignment and other aspects. The box itself is floating div, which, like images, can appear on the right or left or across the entire page.  Article text will wrap around the div in the first two cases. This is useful in articles that are short on images and need some graphic-like element, or where an important or interesting quote wants to be presented in a way that sets it off from the surrounding text.
  
 
'''Caution:''' This is a div-based template, so it may malfunction if indented using wikitext syntax.  This is a current limitation of the Wikipedia [[HTML]] parsing software.
 
'''Caution:''' This is a div-based template, so it may malfunction if indented using wikitext syntax.  This is a current limitation of the Wikipedia [[HTML]] parsing software.
  
When used with a poem, it is convenient to wrap the poem's content in {{tag|poem}} tags; these preserve line breaks without having to manually insert {{tag|br|s}} markup.
+
When used with a poem, it is convenient to wrap the poem's content in {{Tag|poem}} tags; these preserve line breaks without having to manually insert {{Tag|br|s}} markup.
  
 
{{QuoteBox|To be or not to be ...}}
 
{{QuoteBox|To be or not to be ...}}
Line 20: Line 22:
 
* title = Optional title to appear at the top of the quote box.
 
* title = Optional title to appear at the top of the quote box.
 
* quote =  The quote or other text to be displayed in the box.
 
* quote =  The quote or other text to be displayed in the box.
* author = Optional name of the author. A {{tag|ref}} reference citation can be added at the end.
+
* author = Optional name of the author. A {{Tag|ref}} reference citation can be added at the end.
* source = Optional source of the quote ("Quoted" or ''Italic'' work title, and other publication data). A {{tag|ref}} reference citation can be added at the end.
+
* source = Optional source of the quote ("Quoted" or ''Italic'' work title, and other publication data). A {{Tag|ref}} reference citation can be added at the end.
  
 
'''Main box styling'''
 
'''Main box styling'''
 
* align: Alignment of the quote box on the page—left / right / center / none.  Defaults to right alignment. Using <nowiki>align=none</nowiki> will remove word wrapping.
 
* align: Alignment of the quote box on the page—left / right / center / none.  Defaults to right alignment. Using <nowiki>align=none</nowiki> will remove word wrapping.
* width: The width of the quote box.  Defaults to the width of the quote included, unless {{para|align|center}} where the width will default to 100%.
+
* width: The width of the quote box.  Defaults to the width of the quote included, unless {{Para|align|center}} where the width will default to 100%.
 
* border: The width of the quote box border.  Defaults to 1px.  Remember to include 'px' or 'em' to specify the correct width.
 
* border: The width of the quote box border.  Defaults to 1px.  Remember to include 'px' or 'em' to specify the correct width.
 
* fontsize: The fontsize of the quote box text.  Defaults to 88%.
 
* fontsize: The fontsize of the quote box text.  Defaults to 88%.
Line 39: Line 41:
 
* qalign: Alignment of the quote element—left / right / center.  Defaults to left.
 
* qalign: Alignment of the quote element—left / right / center.  Defaults to left.
 
* qstyle: A generic CSS style parameter.  Entries in this parameter supersede any duplicates in the preceding quote parameters.
 
* qstyle: A generic CSS style parameter.  Entries in this parameter supersede any duplicates in the preceding quote parameters.
* quoted: If this parameter evaluates to true (is not 0, false, or empty) the quote box will enclose the quote in ''fat-quotes''.  Use judiciously, per [[MOS:QUOTE]].
+
* quoted: If this parameter evaluates to true (is not 0, false, or empty) the quote box will enclose the quote in ''fat-quotes''.  Use judiciously, per {{wpl|MOS:QUOTE}}.
  
 
'''Source styling'''
 
'''Source styling'''
These affect the entire {{para|author}} and {{para|source}} block, below the quotation.
+
These affect the entire {{Para|author}} and {{Para|source}} block, below the quotation.
 
* salign: Alignment of the source element—left / right / center. Defaults to the value of qalign.
 
* salign: Alignment of the source element—left / right / center. Defaults to the value of qalign.
 
* sstyle: A generic CSS style parameter.  Entries in this parameter supersede any duplicates in the preceding source parameters.
 
* sstyle: A generic CSS style parameter.  Entries in this parameter supersede any duplicates in the preceding source parameters.
  
 
=== Full syntax ===
 
=== Full syntax ===
 
 
<pre>
 
<pre>
{{Quote box
+
{{QuoteBox
 
  |class = <!-- Advanced users only.  See the "Custom classes" section below. -->
 
  |class = <!-- Advanced users only.  See the "Custom classes" section below. -->
 
  |title =  
 
  |title =  
Line 74: Line 75:
 
=== Examples ===
 
=== Examples ===
  
Various example codes and their results. For more intricate examples see [[Template:Quote_box/examples]]. In the examples the {{tl|lorem ipsum}} template merely generates several lines of sample text without meaning, and is not part of the quote syntax.
+
Various example codes and their results. For more intricate examples see {{wpl|Template:Quote box/examples}}. In the examples the {{tl|lorem ipsum}} template merely generates several lines of sample text without meaning, and is not part of the quote syntax.
  
 
==== Floating and wrapping ====
 
==== Floating and wrapping ====
Line 80: Line 81:
 
'''Minimal code, defaults to floating right and minimal width:'''
 
'''Minimal code, defaults to floating right and minimal width:'''
  
<source lang="moin">
+
<pre>
 
{{QuoteBox
 
{{QuoteBox
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
Line 87: Line 88:
 
}}
 
}}
 
{{Lorem ipsum}}
 
{{Lorem ipsum}}
</source>
+
</pre>
 
 
 
{{QuoteBox
 
{{QuoteBox
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
Line 99: Line 99:
 
'''Floating right:'''
 
'''Floating right:'''
  
<source lang="moin">
+
<pre>
 
{{QuoteBox
 
{{QuoteBox
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
Line 108: Line 108:
 
}}
 
}}
 
{{Lorem ipsum}}
 
{{Lorem ipsum}}
</source>
+
</pre>
 
 
 
{{QuoteBox
 
{{QuoteBox
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
Line 121: Line 120:
  
 
'''Floating left:'''
 
'''Floating left:'''
 
+
<pre>
<source lang="moin">
 
 
{{QuoteBox
 
{{QuoteBox
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
Line 131: Line 129:
 
}}
 
}}
 
{{Lorem ipsum}}
 
{{Lorem ipsum}}
</source>
+
</pre>
 
 
 
{{QuoteBox
 
{{QuoteBox
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
Line 144: Line 141:
  
 
'''Centered, not floating:'''
 
'''Centered, not floating:'''
 
+
<pre>
<source lang="moin">
 
 
{{QuoteBox
 
{{QuoteBox
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
Line 154: Line 150:
 
}}
 
}}
 
{{Lorem ipsum}}
 
{{Lorem ipsum}}
</source>
+
</pre>
 
 
 
{{QuoteBox
 
{{QuoteBox
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
Line 164: Line 159:
 
}}
 
}}
 
{{Lorem ipsum}}
 
{{Lorem ipsum}}
{{-}}
 
  
 
==== Fat-quotes ====
 
==== Fat-quotes ====
 
+
<pre>
<source lang="moin">
 
 
{{QuoteBox
 
{{QuoteBox
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
Line 175: Line 168:
 
  |quoted = 1
 
  |quoted = 1
 
}}
 
}}
</source>
+
</pre>
 
 
 
{{QuoteBox
 
{{QuoteBox
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
 
  |quote  = Cry "Havoc", and let slip the dogs of war.
Line 183: Line 175:
 
  |quoted = 1
 
  |quoted = 1
 
}}
 
}}
 
+
<br clear=all/>
{{-}}
 
  
 
==== Alignment of text in box====
 
==== Alignment of text in box====
<source lang="moin">
+
<pre>
 
{{QuoteBox
 
{{QuoteBox
 
  |title = Centered quote
 
  |title = Centered quote
Line 195: Line 186:
 
  |qalign = center
 
  |qalign = center
 
}}
 
}}
</source>
+
</pre>
 
 
 
{{QuoteBox
 
{{QuoteBox
 
  |title = Centered quote
 
  |title = Centered quote
Line 204: Line 194:
 
  |qalign = center
 
  |qalign = center
 
}}
 
}}
 +
<br clear=all/>
  
{{-}}
+
<pre>
 
 
<source lang="moin">
 
 
{{QuoteBox
 
{{QuoteBox
 
  |title = Left title, right quote
 
  |title = Left title, right quote
Line 216: Line 205:
 
  |qalign = right
 
  |qalign = right
 
}}
 
}}
</source>
+
</pre>
 
 
 
{{QuoteBox
 
{{QuoteBox
 
  |title = Left title, right quote
 
  |title = Left title, right quote
Line 226: Line 214:
 
  |qalign = right
 
  |qalign = right
 
}}
 
}}
 
+
<br clear=all/>
{{-}}
 
  
 
==== Custom classes ====
 
==== Custom classes ====
Line 234: Line 221:
  
 
===== Letterhead custom class =====
 
===== Letterhead custom class =====
The "letterhead" class should be used with {{para|title_bg|none}}, {{para|border|none}}, and {{para|bgcolor}} either not used or set to "none".  Since the upper-left-corner will have a white background, it should only be used on pages with a white background.
+
The "letterhead" class should be used with {{Para|title_bg|none}}, {{Para|border|none}}, and {{Para|bgcolor}} either not used or set to "none".  Since the upper-left-corner will have a white background, it should only be used on pages with a white background.
  
Care should be taken that neither the title nor the text extends into the "left corner" portion of the box. To use a blank line for a title, use {{para|title|&amp;nbsp;}}. To provide a blank line at the bottom of the letterhead, add <nowiki><br /><br /></nowiki> to the end of the {{para|source}} parameter (or {{para|author}}, if {{para|source}} was not used).
+
Care should be taken that neither the title nor the text extends into the "left corner" portion of the box. To use a blank line for a title, use {{Para|title|&amp;nbsp;}}. To provide a blank line at the bottom of the letterhead, add <nowiki><br /><br /></nowiki> to the end of the {{Para|source}} parameter (or {{Para|author}}, if {{Para|source}} was not used).
 
+
<pre>
<source lang="moin">
 
 
{{QuoteBox
 
{{QuoteBox
 
  |class = letterhead
 
  |class = letterhead
Line 249: Line 235:
 
  |qalign = right
 
  |qalign = right
 
}}
 
}}
</source>
+
</pre>
 
 
 
{{QuoteBox
 
{{QuoteBox
 
  |class = letterhead
 
  |class = letterhead
Line 262: Line 247:
 
  |qalign = right
 
  |qalign = right
 
}}
 
}}
{{clear}}
+
{{Clear}}
  
 
==== Collapsing text ====
 
==== Collapsing text ====
Sections of text can be collapsed by use of {{tl|hidden begin}} and {{tl|hidden end}}.
+
Sections of text can be collapsed by use of {{Tl|Hidden begin}} and {{Tl|Hidden end}}.
{{markup
+
{{Markup
 
|<nowiki>{{QuoteBox
 
|<nowiki>{{QuoteBox
| border=2px
+
|border = 2px
| align=center
+
|align   = center
| bgcolor = Cornsilk
+
|bgcolor = Cornsilk
| title=The Spider and the Fly
+
|title   = The Spider and the Fly
| halign=center
+
|halign = center
| quote=<poem>
+
|quote   = <poem>
 
"Will you walk into my parlour?" said the Spider to the Fly,
 
"Will you walk into my parlour?" said the Spider to the Fly,
 
&nbsp;'Tis the prettiest little parlour that ever you did spy;
 
&nbsp;'Tis the prettiest little parlour that ever you did spy;
Line 280: Line 265:
 
"''Oh no, no,''" said the little Fly, "''to ask me is in vain,''
 
"''Oh no, no,''" said the little Fly, "''to ask me is in vain,''
 
''For who goes up your winding stair can ne'er come down again.''"
 
''For who goes up your winding stair can ne'er come down again.''"
{{hidden begin}}
+
{{Hidden begin}}
 
"I'm sure you must be weary, dear, with soaring up so high;
 
"I'm sure you must be weary, dear, with soaring up so high;
 
Will you rest upon my little bed?" said the Spider to the Fly.
 
Will you rest upon my little bed?" said the Spider to the Fly.
Line 287: Line 272:
 
"''Oh no, no,''" said the little Fly, &nbsp;"''for I've often heard it said,''
 
"''Oh no, no,''" said the little Fly, &nbsp;"''for I've often heard it said,''
 
''They never, never wake again, who sleep upon your bed!''"
 
''They never, never wake again, who sleep upon your bed!''"
 +
{{Hidden end}}
 
</poem>
 
</poem>
{{hidden end}}
+
|salign = right
|salign=right
+
|author = [[Mary Howitt]]
|author=[[Mary Howitt]]
+
|source = <small>1829</small>
|source=<small>1829</small>
 
 
}}</nowiki>
 
}}</nowiki>
 
|{{QuoteBox
 
|{{QuoteBox
| border=2px
+
|border=2px
| align=center
+
|align=center
| bgcolor = Cornsilk
+
|bgcolor = Cornsilk
| title=The Spider and the Fly
+
|title=The Spider and the Fly
| halign=center
+
|halign=center
| quote=<poem>
+
|quote=<poem>
 
"Will you walk into my parlour?" said the Spider to the Fly,
 
"Will you walk into my parlour?" said the Spider to the Fly,
 
&nbsp;'Tis the prettiest little parlour that ever you did spy;
 
&nbsp;'Tis the prettiest little parlour that ever you did spy;
Line 306: Line 291:
 
"''Oh no, no,''" said the little Fly, "''to ask me is in vain,''
 
"''Oh no, no,''" said the little Fly, "''to ask me is in vain,''
 
''For who goes up your winding stair can ne'er come down again.''"
 
''For who goes up your winding stair can ne'er come down again.''"
{{hidden begin}}
+
{{Hidden begin}}
 
"I'm sure you must be weary, dear, with soaring up so high;
 
"I'm sure you must be weary, dear, with soaring up so high;
 
Will you rest upon my little bed?" said the Spider to the Fly.
 
Will you rest upon my little bed?" said the Spider to the Fly.
Line 313: Line 298:
 
"''Oh no, no,''" said the little Fly, &nbsp;"''for I've often heard it said,''
 
"''Oh no, no,''" said the little Fly, &nbsp;"''for I've often heard it said,''
 
''They never, never wake again, who sleep upon your bed!''"
 
''They never, never wake again, who sleep upon your bed!''"
 +
{{Hidden end}}
 
</poem>
 
</poem>
{{hidden end}}
 
 
|salign=right
 
|salign=right
 
|author=[[Mary Howitt]]
 
|author=[[Mary Howitt]]
Line 321: Line 306:
 
}}
 
}}
  
Note that, although {{para|halign|center}}, the centering is reset after the {{tl|hidden begin}}, since that template applies its own styling. This can be resolved by using {{para|contentstyle}} in {{tl|hidden begin}} with appropriate markup; in this case:
+
Note that, although {{Para|halign|center}}, the centering is reset after the {{Tl|Hidden begin}}, since that template applies its own styling. This can be resolved by using {{Para|contentstyle}} in {{Tl|Hidden begin}} with appropriate markup; in this case:
:{{tlx|hidden begin |ta2{{=}}center |contentstyle{{=}}margin: 1em auto;}}
+
:{{Tlx|Hidden begin |Ta2{{=}}center |contentstyle{{=}}margin: 1em auto;}}
  
{{markup
+
{{Markup
 
|<nowiki>{{QuoteBox
 
|<nowiki>{{QuoteBox
 
| border=2px
 
| border=2px
Line 338: Line 323:
 
"''Oh no, no,''" said the little Fly, "''to ask me is in vain,''
 
"''Oh no, no,''" said the little Fly, "''to ask me is in vain,''
 
''For who goes up your winding stair can ne'er come down again.''"
 
''For who goes up your winding stair can ne'er come down again.''"
{{hidden begin||ta2=center|contentstyle=margin: 1em auto;}}
+
{{Hidden begin||ta2=center|contentstyle=margin: 1em auto;}}
 
"I'm sure you must be weary, dear, with soaring up so high;
 
"I'm sure you must be weary, dear, with soaring up so high;
 
Will you rest upon my little bed?" said the Spider to the Fly.
 
Will you rest upon my little bed?" said the Spider to the Fly.
Line 345: Line 330:
 
"''Oh no, no,''" said the little Fly, &nbsp;"''for I've often heard it said,''
 
"''Oh no, no,''" said the little Fly, &nbsp;"''for I've often heard it said,''
 
''They never, never wake again, who sleep upon your bed!''"
 
''They never, never wake again, who sleep upon your bed!''"
{{hidden end}}
+
{{Hidden end}}
 
</poem>
 
</poem>
 
|salign=right
 
|salign=right
Line 365: Line 350:
 
"''Oh no, no,''" said the little Fly, "''to ask me is in vain,''
 
"''Oh no, no,''" said the little Fly, "''to ask me is in vain,''
 
''For who goes up your winding stair can ne'er come down again.''"
 
''For who goes up your winding stair can ne'er come down again.''"
{{hidden begin||ta2=center|contentstyle=margin: 1em auto;}}
+
{{Hidden begin||ta2=center|contentstyle=margin: 1em auto;}}
 
"I'm sure you must be weary, dear, with soaring up so high;
 
"I'm sure you must be weary, dear, with soaring up so high;
 
Will you rest upon my little bed?" said the Spider to the Fly.
 
Will you rest upon my little bed?" said the Spider to the Fly.
Line 372: Line 357:
 
"''Oh no, no,''" said the little Fly, &nbsp;"''for I've often heard it said,''
 
"''Oh no, no,''" said the little Fly, &nbsp;"''for I've often heard it said,''
 
''They never, never wake again, who sleep upon your bed!''"
 
''They never, never wake again, who sleep upon your bed!''"
{{hidden end}}
+
{{Hidden end}}
 
</poem>
 
</poem>
 
|salign=right
 
|salign=right
Line 379: Line 364:
 
}}
 
}}
 
}}
 
}}
 
+
<includeonly>[[Category:WikiCorporates templates]]}}</includeonly>
<includeonly>[[Category:WikiPolitiks templates]]}}</includeonly>
 

Latest revision as of 15:18, 30 May 2020

Copied from Template:Quote boxWikipedia-W.svg. The show/hide stuff doesn't work on Ahania.

This template can be used for block quotations (long quotes set off from the main text). However, this use is not advised in articles. The Manual of Style guidelines for block quotations recommend formatting block quotations using the {{Quote}} template or the HTML <blockquote> element, for which that template provides a wrapper.

  • Quotes work best when used with short sentences, and at the start or end of a section, as a hint of or to help emphasize the section's content.
  • For typical quotes, especially those longer than the rest of the paragraph in which they are quoted, {{Cquote}} provides a borderless quote with decorative quotation marks, and {{Quote frame}} provided a bordered quote. Both span the article width. (However, do not use {{Cquote}} for block quotations in articles.)
  • For very short quotes, {{Rquote}} (with decorative quotation marks) or {{QuoteBox}} (framed) can be used to set the quote off to either the right or left as in a magazine sidebar. This can be effective on essay pages and WikiProject homepages.

Usage

For actual quotes, and poems, this template (a variant of {{Quote frame}}) can be used to present a title, quote, author, and source in a box such as that shown opposite, with options to customise its bordering, background, alignment and other aspects. The box itself is floating div, which, like images, can appear on the right or left or across the entire page. Article text will wrap around the div in the first two cases. This is useful in articles that are short on images and need some graphic-like element, or where an important or interesting quote wants to be presented in a way that sets it off from the surrounding text.

Caution: This is a div-based template, so it may malfunction if indented using wikitext syntax. This is a current limitation of the Wikipedia HTML parsing software.

When used with a poem, it is convenient to wrap the poem's content in <poem>...</poem> tags; these preserve line breaks without having to manually insert <br /> markup.

To be or not to be ...

Parameters

Basic parameters

  • title = Optional title to appear at the top of the quote box.
  • quote = The quote or other text to be displayed in the box.
  • author = Optional name of the author. A <ref>...</ref> reference citation can be added at the end.
  • source = Optional source of the quote ("Quoted" or Italic work title, and other publication data). A <ref>...</ref> reference citation can be added at the end.

Main box styling

  • align: Alignment of the quote box on the page—left / right / center / none. Defaults to right alignment. Using align=none will remove word wrapping.
  • width: The width of the quote box. Defaults to the width of the quote included, unless |align=center where the width will default to 100%.
  • border: The width of the quote box border. Defaults to 1px. Remember to include 'px' or 'em' to specify the correct width.
  • fontsize: The fontsize of the quote box text. Defaults to 88%.
  • bgcolor: The RGB background color of the box. Defaults to #F9F9F9 (light gray).
  • style: A generic CSS style parameter. Entries in this parameter supersede any duplicates in the preceding parameters.

Title styling

  • title_bg: The RGB background color of the title. Defaults to #F9F9F9 (light gray).
  • title_fnt: The title font color. Defaults to black.
  • tstyle: A generic CSS style parameter. Entries in this parameter supersede any duplicates in the preceding title parameters.

Quote styling

  • qalign: Alignment of the quote element—left / right / center. Defaults to left.
  • qstyle: A generic CSS style parameter. Entries in this parameter supersede any duplicates in the preceding quote parameters.
  • quoted: If this parameter evaluates to true (is not 0, false, or empty) the quote box will enclose the quote in fat-quotes. Use judiciously, per MOS:QUOTEWikipedia-W.svg.

Source styling These affect the entire |author= and |source= block, below the quotation.

  • salign: Alignment of the source element—left / right / center. Defaults to the value of qalign.
  • sstyle: A generic CSS style parameter. Entries in this parameter supersede any duplicates in the preceding source parameters.

Full syntax

{{QuoteBox
 |class = <!-- Advanced users only.  See the "Custom classes" section below. -->
 |title = 
 |quote = 
 |author = 
 |source = 
 |align = 
 |width = 
 |border = 
 |fontsize = 
 |bgcolor = 
 |style = 
 |title_bg = 
 |title_fnt = 
 |tstyle = 
 |qalign = 
 |qstyle = 
 |quoted = 
 |salign = 
 |sstyle = 
}}

Examples

Various example codes and their results. For more intricate examples see Template:Quote box/examplesWikipedia-W.svg. In the examples the Template:tl template merely generates several lines of sample text without meaning, and is not part of the quote syntax.

Floating and wrapping

Minimal code, defaults to floating right and minimal width:

{{QuoteBox
 |quote  = Cry "Havoc", and let slip the dogs of war.
 |author = [[William Shakespeare]]
 |source = ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.
}}
{{Lorem ipsum}}
Cry "Havoc", and let slip the dogs of war.
William Shakespeare, Julius Caesar, Act III, Scene I.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Floating right:

{{QuoteBox
 |quote  = Cry "Havoc", and let slip the dogs of war.
 |author = [[William Shakespeare]]
 |source = ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.
 |width  = 50%
 |align  = right
}}
{{Lorem ipsum}}
Cry "Havoc", and let slip the dogs of war.
William Shakespeare, Julius Caesar, Act III, Scene I.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Floating left:

{{QuoteBox
 |quote  = Cry "Havoc", and let slip the dogs of war.
 |author = [[William Shakespeare]]
 |source = ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.
 |width  = 50%
 |align  = left
}}
{{Lorem ipsum}}
Cry "Havoc", and let slip the dogs of war.
William Shakespeare, Julius Caesar, Act III, Scene I.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Centered, not floating:

{{QuoteBox
 |quote  = Cry "Havoc", and let slip the dogs of war.
 |author = [[William Shakespeare]]
 |source = ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.
 |width  = 50%
 |align  = center
}}
{{Lorem ipsum}}
Cry "Havoc", and let slip the dogs of war.
William Shakespeare, Julius Caesar, Act III, Scene I.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Fat-quotes

{{QuoteBox
 |quote  = Cry "Havoc", and let slip the dogs of war.
 |author = [[William Shakespeare]]
 |source = ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.
 |quoted = 1
}}
Cry "Havoc", and let slip the dogs of war.
William Shakespeare, Julius Caesar, Act III, Scene I.


Alignment of text in box

{{QuoteBox
 |title = Centered quote
 |quote  = Cry "Havoc", and let slip the dogs of war.
 |author = [[William Shakespeare]]
 |source = ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.
 |qalign = center
}}
Centered quote
Cry "Havoc", and let slip the dogs of war.
William Shakespeare, Julius Caesar, Act III, Scene I.


{{QuoteBox
 |title = Left title, right quote
 |tstyle = text-align: left;
 |quote  = Cry "Havoc", and let slip the dogs of war.
 |author = [[William Shakespeare]]
 |source = ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.
 |qalign = right
}}
Left title, right quote
Cry "Havoc", and let slip the dogs of war.
William Shakespeare, Julius Caesar, Act III, Scene I.


Custom classes

This parameter should only be used by editors who fully understand how this template works.

The "class=" parameter can be used add a generic CSS class to this template. Some classes are not compatible with other options or require specific options be set to be useful or look good.

Letterhead custom class

The "letterhead" class should be used with |title_bg=none, |border=none, and |bgcolor= either not used or set to "none". Since the upper-left-corner will have a white background, it should only be used on pages with a white background.

Care should be taken that neither the title nor the text extends into the "left corner" portion of the box. To use a blank line for a title, use |title=&nbsp;. To provide a blank line at the bottom of the letterhead, add <br /><br /> to the end of the |source= parameter (or |author=, if |source= was not used).

{{QuoteBox
 |class = letterhead
 |title =  
 |tstyle = text-align: right;
 |title_bg = none
 |border=none
 |author = [[William Shakespeare]]
 |source = ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.<br /><br />
 |qalign = right
}}
 
Cry "Havoc", and let slip the dogs of war.
William Shakespeare, Julius Caesar, Act III, Scene I.

Collapsing text

Sections of text can be collapsed by use of {{Hidden begin}} and {{Hidden end}}.

Markup Renders as
{{QuoteBox
|border  = 2px
|align   = center
|bgcolor = Cornsilk
|title   = The Spider and the Fly
|halign  = center
|quote   = <poem>
"Will you walk into my parlour?" said the Spider to the Fly,
 'Tis the prettiest little parlour that ever you did spy;
The way into my parlour is up a winding stair,
And I've a many curious things to shew when you are there."
"''Oh no, no,''" said the little Fly, "''to ask me is in vain,''
''For who goes up your winding stair can ne'er come down again.''"
{{Hidden begin}}
"I'm sure you must be weary, dear, with soaring up so high;
Will you rest upon my little bed?" said the Spider to the Fly.
"There are pretty curtains drawn around; the sheets are fine and thin,
And if you like to rest awhile, I'll snugly tuck you in!"
"''Oh no, no,''" said the little Fly,  "''for I've often heard it said,''
''They never, never wake again, who sleep upon your bed!''"
{{Hidden end}}
</poem>
|salign = right
|author = [[Mary Howitt]]
|source = <small>1829</small>
}}
The Spider and the Fly

"Will you walk into my parlour?" said the Spider to the Fly,
 'Tis the prettiest little parlour that ever you did spy;
The way into my parlour is up a winding stair,
And I've a many curious things to shew when you are there."
"Oh no, no," said the little Fly, "to ask me is in vain,
For who goes up your winding stair can ne'er come down again."

Mary Howitt, 1829

Note that, although |halign=center, the centering is reset after the {{Hidden begin}}, since that template applies its own styling. This can be resolved by using |contentstyle= in {{Hidden begin}} with appropriate markup; in this case:

{{Hidden begin |Ta2=center|contentstyle=margin: 1em auto;}}
Markup Renders as
{{QuoteBox
| border=2px
| align=center
| bgcolor = Cornsilk
| title=The Spider and the Fly
| halign=center
| quote=<poem>
"Will you walk into my parlour?" said the Spider to the Fly,
 'Tis the prettiest little parlour that ever you did spy;
The way into my parlour is up a winding stair,
And I've a many curious things to shew when you are there."
"''Oh no, no,''" said the little Fly, "''to ask me is in vain,''
''For who goes up your winding stair can ne'er come down again.''"
{{Hidden begin||ta2=center|contentstyle=margin: 1em auto;}}
"I'm sure you must be weary, dear, with soaring up so high;
Will you rest upon my little bed?" said the Spider to the Fly.
"There are pretty curtains drawn around; the sheets are fine and thin,
And if you like to rest awhile, I'll snugly tuck you in!"
"''Oh no, no,''" said the little Fly,  "''for I've often heard it said,''
''They never, never wake again, who sleep upon your bed!''"
{{Hidden end}}
</poem>
|salign=right
|author=[[Mary Howitt]]
|source=<small>1829</small>
}}
The Spider and the Fly

"Will you walk into my parlour?" said the Spider to the Fly,
 'Tis the prettiest little parlour that ever you did spy;
The way into my parlour is up a winding stair,
And I've a many curious things to shew when you are there."
"Oh no, no," said the little Fly, "to ask me is in vain,
For who goes up your winding stair can ne'er come down again."

Mary Howitt, 1829