More actions
m Remove extra line break |
Change background color. |
||
| (5 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
{{Color box| | {{Color box | ||
== | |border= #6666a8 | ||
|width= {{{width|95%}}} | |||
|color= #0080FF | |||
|align= left | |||
|text= white | |||
|italics= no | |||
|{{{1|An example!}}} | |||
}}<noinclude> | |||
{ | {{documentation}} | ||
</noinclude> | |||
{{ | |||
Latest revision as of 11:18, 28 May 2025
Template documentation (for the above template, sometimes hidden or invisible)
- Description
- Produces a centered, colored box, which is used to present an example on a page.
- Dependencies
-
- Uses
- {{Color box}}
- Syntax
- {{Example|<content>|<width= width>}}
- Parameters
-
- content
- The example text inside the box. The box has "
An example!" as the default text. If the text includes an equals sign (=), the text needs to be explicitly declared as a numbered parameter (i.e. put1=before the text), otherwise the template will display the default text. - width
- Sets the width of the box. It's recommended to set this as a percentage (of the paragraph width), so
50%will produce a text box half as wide as the surrounding paragraph. The default width is set at 95%. When width is set to less than100%, the box will be centered.
- Examples
| {{Example|An example to ''illustrate'' my article with a link to the [[Venture]].}} |
| {{Example|How not to put the formula 2+2=4 into an example.}} |
| {{Example|1= How to put the formula 2+2=4 into an example.}} |
- See also
- {{Note box}} and {{Important note box}} , designed for general notes and warnings on pages.
- {{Color box}} , the general template for creating colored boxes with text in them.
- Template data
- This is the TemplateData documentation for this template used by VisualEditor and other tools.
Box to present examples in articles. When the (optional) width is set to less then 100% the box will be centered.
Template parameters[Edit template data]
This template has custom formatting.
Parameter Description Type Status Content 1The content of the example box. If the text includes an equals sign (=), the text needs to be explicitly declared as a numbered parameter (i.e. put 1= before the text), otherwise the template will display the default text.
- Default
- An example!
Content required width widthSet the width of the box. Preferably in %
- Default
- 95%
String optional