![]() | Thisguideline is a part of the English Wikipedia'sManual of Style. Editors should generally follow it, thoughexceptions may apply.Substantive edits to this page should reflectconsensus. When in doubt, discuss first onthis guideline's talk page. |
Manual of Style (MoS) | |||||||
---|---|---|---|---|---|---|---|
By topic area
| |||||||
Aninfobox is a panel, usually in the top right of an article, next to thelead section (in thedesktop version of Wikipedia), or after the first paragraph of the lead section of an article (in themobile version), that summarizes key facts about the page's subject.Infoboxes may also include images or maps.
Wikipedia's infoboxes almost always use thetemplate software feature. The templates have parameters; to work properly, the parameter values have to be specified when the template is inserted in the page. This allows each infobox to show information relevant to the article subject, while requiring only a minimal amount of coding within each article.
The purpose of an infobox isto summarize, but not supplant, the key facts that appear in an article. Barring the specific exceptions listed below, an article should remain complete with its infobox ignored. The less information that an infobox contains, the more effectively it serves its purpose, allowing readers to identify key facts at a glance. Some infoboxes need to use more than a handful of fields, but information should be presented in a short format, wherever possible, and exclude unnecessary content. Avoid links to sections within the article; the table of contents provides that function.
There will be exceptions where a piece of key specialised information may be placed in the infobox, but is difficult to integrate into the body text. Examples include theISO 639 and similar codes in{{Infobox language}} and most of the parameters in{{Chembox}}.
Using an infobox also makes its data available to third party re-users (such asDBpedia) in agranular andmachine readable format, often usingmicroformats. Infoboxes can also present data imported fromWikidata (e.g.,Category:Infobox templates using Wikidata), although imported datamust comply with English Wikipedia policies.
WikiProject Infoboxes | ||||
---|---|---|---|---|
List of infoboxes | ||||
Style and help | ||||
Cleanup | ||||
| ||||
Building | ||||
To do | ||||
General consistency should be aimed for across articles using the same infobox. A good guideline is not to add extraneous style formatting over that in a default infobox without good reason. Infoboxes may tend towards greater abbreviation than that generally used in article bodies. The general guidelinesWP:NBSP (use of non-breaking spaces),WP:MOSNUM (numbers and dates), andWP:COLOR (use of color) are likely to be particularly relevant. As withnavigation templates, the purpose of infoboxes is to facilitate convenient access to specific information; they should not prioritize a decorative appearance.
When adding an image to an infobox, thumbnails should NOT be used. Infobox templates should implement theInfoboxImage module to help with formatting of images so simply supplying the file name will work. For example, to useFile:Image PlaceHolder.png, you can simply use|image=Image PlaceHolder.png
. Captions should be specified with the|caption=
option. Every infobox is different and the documentation for the infobox in question should be consulted for the proper parameters to match the image and caption. IfInfoboxImage is not yet fully implemented in the infobox you are using, the same|alt=
,|upright=
,|title=
, etc., options may be called usingExtended image syntax, calling|frameless
, not|thumb
. (You may wish to add a request to the infobox's talk page that the missing parameters be added.)
For consistency the following guidelines apply:
|birth_date=
, as do many other biographical infoboxes, so it would be confusing for a new biographical infobox to use, say|date of birth=
, rather than reusing the existing parameter name.|birth_date=
). Notcamel case (e.g.|birthDate=
) ortitle case (e.g.|BirthDate=
)|birth_place=
not|birth-place=
or|birth place=
.|coordinates=
as the parameter name, with the{{coord}} template in the parameter's value.A number of factors can cause inconsistency in available summary information for a particular type of article:
The availability of optional fields does not mean that all fields should be made optional, nor that large numbers of rarely used fields should be added without regard for the layout and ease-of-use of the infobox template. In some cases, the markup for the field still needs to be downloaded even if it is not displayed. Creating overly long templates with a number of irrelevant fields is not recommended.
As you design an infobox template, consider the following questions:
|death_date=
from{{Infobox person}}, and not a similar name like|date_of_death=
or|died=
.Infoboxes for geographical items (e.g. cities and countries) should generally be headed with the article title, although the formal version of a name (e.g.Republic of Montenegro atMontenegro) can be substituted. Where the article title is disambiguated, the plain name can head the infobox, as long as the topic is clear (e.g.São Paulo atSão Paulo (state)). Alternative or native names can appear beneath this if beneficial. Extensive historic names are often better in a second infobox, as atAugsburg.
In theory, the fields in an infobox should be consistent across every article using it; in practice, however, this is rarely the case, for a number of reasons. Infobox templates should be designed to dynamically adapt themselves to the absence or presence of particular fields.
Like static infoboxes, they are designed to present summary information about an article's subject, such that similar subjects have a uniform look and in a common format. However, the template technique allows updates of style and of common text from a central place, the template page.
While there are several alternatives to dynamic infoboxes, such as using multiple (forked) templates or leaving fields blank, they should be avoided, for a number of reasons:
Assess the requirement of a new infobox before designing one. A few points should be considered while initiating a new infobox:
Basing a new infobox template onTemplate:Infobox allows the designer to concentrate on which fields to include. Functionality such as default styling and suppression of rows in an article that has no value for a particular field are taken care of automatically.
Parser functions can be used to selectively show or hide particular content (such as table rows) within an infobox based on the value of one or more template parameters.
For example, a parameter may be designed to display only if another parameter exists. A simplistic test to display a caption only when an image is present could be:
| caption ={{#if:{{{image|}}}|{{{caption|}}}}}
Several sub-templates (and independent templates) have a common name prefix. They are included in an infobox based on the value of a particular parameter, which acts as the name suffix. For example, we create{{Infobox Ship/Military}}
and{{Infobox Ship/Civilian}}
and use{{Infobox Ship/{{{type}}}}}
. Using|type=Military
in an article causes{{Infobox Ship/Military}}
to be used.
Rather than having each field correspond to a parameter on one template, the infobox consists of an individual sub-template for each field; see, for example,Template:Taxobox.
Templates can be designed in a modular way, such that various combinations are possible. A combination may even appear on the page as a single infobox.
For example, if theWikiProject Saints group wanted to design a template based on their static infobox, they could useTemplate:Infobox Biography, and design a project-specific template with only additional information, and the pages would render both "stacked" together.
The use of infoboxes is neither required nor prohibited for any article. Whether to include an infobox, which infobox to include, and which parts of the infobox to use, is determined throughdiscussion and consensus among the editors at each individual article.
The meaning given to each infobox part should be the same across instances of thattype of infobox. For example, for a particular infobox type, if one of its fields is called "weight", it would be inappropriate to sometimes use this field to denote "weight at birth" and other times "weight at maturity".
Each infobox type should have documentation giving instruction on how each part/field may be used.
Likenavigation templates, infoboxes should generally not contain flag icons. For more information about flag icons, and exceptions to the general guideline, seeMOS:FLAG.
References are acceptable in some cases, but generally not needed in infoboxes if the content is repeated (and cited) elsewhere or if the information is obvious. If the material needs a reference (seeWP:MINREF for guidelines) and the information does not also appear in the body of the article, the reference should be included in the infobox. But editors should first consider including the fact in the body of the article.
The Wikipedia community has decided atthis RfC not to allow the use of an|ethnicity=
parameter in biography infoboxes.
The Wikipedia community has decided atthis RfC not to allow the use of a|religion=
parameter in general biography infoboxes. Such a parameter should only appear in infoboxes that pertain to classes of persons for whom religion is integral to their notability, e.g.{{Infobox clergy}}
.
In biographies, a|nationality=
field should not be used. This was previously available forlegal nationality, but was often confused withnational identity orethnicity.
A|citizenship=
field can be used, with the following guidelines:
If needed to indicate legal nationality, use "national of" rather than "nationality", to avoid confusion with ethnicity.
The|alma mater=
parameter is a more concise alternative to (not addition to) the|education=
parameter, and will often consist of the linked name of the last-attended institution of higher education (not secondary schools). It is usually not relevant to include either parameter for non-graduates, but article talk page consensus may conclude otherwise, as forBill Gates, who dropped out of Harvard to start Microsoft.
Users can haveuser CSS that hides any infoboxes in their own browsers.
To hide all infoboxes, add the following toSpecial:MyPage/common.css (for allskins, orSpecial:MyPage/skin.css for just the current skin), on a line by itself:
div.mw-parser-output.infobox{display:none;}
Alternatively, you can add the following code toyour common.js or into a browser user script that is executed by an extension likeGreasemonkey:
$('.infobox').hide();
Be aware that although all information in an infobox ideally should also be found in the main body of an article, there isn't perfect compliance with this guideline. For example, the full taxonomic hierarchy in{{Taxobox}}
, and the OMIM and other medical database codes of{{Infobox disease}}
are often not found in the main article content. The infobox is also often the location of the most significant, even only, image in an article. There is a userscript which removes infoboxes but moves the images contained to separate thumbnails:User:Maddy from Celeste/disinfobox.js.