Misplaced Pages

:Manual of Style/Infoboxes: Difference between revisions - Misplaced Pages

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< Misplaced Pages:Manual of Style Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 18:26, 16 November 2011 editPigsonthewing (talk | contribs)Autopatrolled, Event coordinators, Extended confirmed users, Page movers, File movers, IP block exemptions, New page reviewers, Pending changes reviewers, Rollbackers, Template editors266,349 editsm )← Previous edit Latest revision as of 07:38, 30 November 2024 edit undoDrKay (talk | contribs)Autopatrolled, Administrators159,921 edits Nationality and citizenship in infoboxes 
(379 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
{{Short description|Wikimedia project page}}
{{style-guideline|WP:IBX|WP:IBT|sortkey=Infoboxes}}
{{Redirect2|Misplaced Pages:Infobox|Misplaced Pages:Infoboxes|the WikiProject|Misplaced Pages:WikiProject Infoboxes|general help on creating infoboxes|Help:Infobox}}

{{MoS guideline|MOS:IBX|MOS:INFOBOX|sortkey=Infoboxes}}
{{style}} {{style}}
{{Infoboxwatch}}


An '''infobox template''' is an ] that uses the ] software feature. They are a broad class of templates commonly used in articles to present certain summary or overview information about the subject. An '''infobox''' is a panel, usually in the top right of an article, next to the ] (in the ] of Misplaced Pages), or after the first paragraph of the lead section of an article (in the ]), that summarizes key facts about the page's subject. ]es may also include images or maps.


These boxes are designed to be placed into main articles related to the topic area, and are usually associated with on-going ]. They 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. ] almost always use the ] 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.


==Purpose==
== Design principles ==
{{shortcut|MOS:INFOBOXPURPOSE|MOS:IBP}}
The purpose of an infobox is ], 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.


{{shortcut|MOS:INFOBOXEXCEPTIONS}}{{anchor|Exceptions}}
===Purpose of an infobox===
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 the ] and similar codes in {{tl|Infobox language}} and most of the parameters in {{tl|Chembox}}.
When considering any aspect of infobox design, keep in mind the purpose of an infobox: to summarize key facts about the article in which it appears. The less information it contains, the more effectively it serves that purpose, allowing readers to identify key facts at a glance. Of necessity, some infoboxes contain more than just a few fields; however, wherever possible, present information in short form, and exclude any unnecessary content. Do not include links to sections within the article; the table of contents provides that function.


Using an infobox also makes its data available to third party re-users (such as ]) in a ] and ], often using ]s. Infoboxes can also present data imported from ] (e.g., ]), although imported data ].
Using an infobox also makes the data within it available to ].


== Design principles ==
===Overall approach===
{{WikiProject Infoboxes sidebar}}
The recommended process for creating an infobox template is to simply begin, and gather as many requirements as possible. Test the base format for a new template as a static table first, then once consensus is reached, migrate it into template format. The template should be reviewed before being used extensively in articles in case the template or defined parameters need modification to minimize re-works. If new fields and parameters are added, articles must be updated to reflect the new requirements. If parameters are renamed or removed, many articles will likely be unaffected, since extraneous parameters are ignored.
===Style, color and formatting===
{{shortcut|MOS:INFOBOXSTYLE}}
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 guidelines ] (use of non-breaking spaces), ] (numbers and dates), and ] (use of color) are likely to be particularly relevant. As with ], the purpose of infoboxes is to facilitate convenient access to specific information; they should not prioritize a decorative appearance.


===Images===
=== Consistency between infoboxes ===
{{shortcut|MOS:IBI|MOS:INFOBOXIMAGE}}
{{see also|Misplaced Pages:Image use policy#Displayed image size|Misplaced Pages:Manual of Style/Images#Images for the lead}}
When adding an image to an infobox, thumbnails should NOT be used. Infobox templates should implement the ] module to help with formatting of images so simply supplying the file name will work. For example, to use ], you can simply use {{para|image|Image PlaceHolder.png}}. Captions should be specified with the {{para|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. If ] is not yet fully implemented in the infobox you are using, the same {{para|alt}}, {{para|upright}}, {{para|title}}, etc., options may be called using ], calling {{para||frameless}}, not {{para||thumb}}. (You may wish to add a request to the infobox's talk page that the missing parameters be added.)


=== Consistency between infoboxes ===
{{shortcut|MOS:INFOBOXNAME}}
For consistency the following guidelines apply: For consistency the following guidelines apply:


* Before creating a new Infobox template, check first to see whether a suitable Infobox already exists. * Before creating a new infobox template, check first to see whether a suitable infobox already exists.
* Name the template '''<nowiki>]</nowiki>''' (''some subject'' should be in the singular and capitalized as per normal usage—see ]). * Name the template '''<nowiki>]</nowiki>''' (''some subject'' should be in the singular and capitalized as per normal usage—{{cross-reference|see ]}}, e.g., "Infobox settlement" or "Infobox NFL player").
* Use {{tl|infobox}} template to create a new infobox.
* The {{tl|infobox}} template can be used to create new infobox easily. If for some reason {{tl|infobox}} is not suitable and the table is to be created manually, the template code should use <code>class="infobox"</code> for the main table declaration. This automatically picks the right alignment, font sizes and spacing to fit in with existing infoboxes. A width of 22 ]s (<code>22em</code> in ]) is suggested as an additional declaration to match the {{tl|infobox}} default.
* The template should have a large, bold title line. Either a table caption or a header can be used for this. It should be named the common name of the article's subject but may contain the full (official) name; this does not need to match the article's Misplaced Pages title, but falling back to use that (with the <code><nowiki>{{PAGENAME}}</nowiki></code> ]) is usually fine. It should not contain a link. * The template should have a large, bold title line. Either a table caption or a header can be used for this. It should be named the common name of the article's subject but may contain the full (official) name; this does not need to match the article's Misplaced Pages title, but falling back to use that (with {{t|PAGENAMEBASE}}) is usually fine. It should not contain a link.
* ] in infoboxes should be named, not numbered, to provide for future use. A parameter value can contain images (i.e. full image tags), or parameters for parts of an image tag such as the image name, size and caption. * ] in infoboxes should:
** be named, not numbered, to provide for future use.
* Parameter names should use lower-case unless they are proper nouns.
** use lower-case unless they are proper nouns.
* Parameter names should be consistent between infoboxes. For example, {{Tl|Infobox person}} uses {{Para|birth_date}}, as do many other biographical infoboxes, so it would be foolish for a new biographical infobox to use, say {{Para|date of birth}}, rather than reusing the existing parameter name.
** be consistent between infoboxes. For example, {{Tl|Infobox person}} uses {{para|birth_date}}, as do many other biographical infoboxes, so it would be confusing for a new biographical infobox to use, say {{Para|date of birth}}, rather than reusing the existing parameter name.
* Multi-word parameter names should be separated with spaces, thus: {{Para|first second}}
** Use ] (e.g. {{para|birth_date}}). Not ] (e.g. {{para|birthDate}}) or ] (e.g. {{para|BirthDate}})
* If a parameter is not applicable, or no information is available, it should be left blank, and the template coded to selectively hide information or provide default values if not defined.
** represent spaces using an ], e.g. {{para|birth_place}} not {{para|birth-place}} or {{para|birth place}}.
* ] should use {{para|coordinates}} as the parameter name, with the {{tl|coord}} template in the parameter's value.
* If a parameter is not applicable, or no information is available, it should be left blank, and the template coded to selectively hide information or provide default values for parameters that are not defined.

====Causes of inconsistency====
A number of factors can cause inconsistency in available summary information for a particular type of article:

; Design inconsistency
: Infoboxes, particularly infobox forks for the same category of articles, should maintain a consistent appearance with related infoboxes, particularly in relation to layout, colour and structure. For example, ] a degree of similarity when viewing the article for ] vs ].
; Historical incompleteness
: Certain desired information may simply have been lost over time. For example, an infobox describing a modern bank may provide certain financial information that would be unavailable for a medieval one.
; Hierarchical inconsistency
: Infoboxes that indicate hierarchical relationships may have subtly different requirements depending on where in the hierarchy the subject of the article is located. For example, an infobox for corporations will be different between an article describing a parent company and indicating its subsidiaries and an article describing a subsidiary and indicating its parent.
; Feature inconsistency
: Items within a single set may have optional features that would commonly be listed in an infobox. For example, an infobox for an article about a university may include a motto; but not all universities have them.
; Lack of information
: Some items in infoboxes may not be readily available or not available at all, such as the producers of an album or film. In these cases it is better to provide available information while concealing fields for which information may not be available.


=== General considerations === === General design considerations ===
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. 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.


Line 37: Line 66:


; Is the field of value?: How important is the field to the articles that will use the infobox? Is it summary information, or more extended detail that may be better placed within the body of an article? ; Is the field of value?: How important is the field to the articles that will use the infobox? Is it summary information, or more extended detail that may be better placed within the body of an article?
; Will the field be relevant to many of the articles that will use the infobox?: If the field is relevant to very few articles, it should probably not be included at all. Conversely, very common fields may be included{{snd}}and made optional{{snd}}even if they are not applicable to a few of the articles in question.

; Will the field be relevant to many of the articles that will use the infobox?: If the field is relevant to very few articles, it should probably not be included at all. Conversely, very common fields may be included—and made optional—even if they are not applicable to a few of the articles in question.

; How likely is the field to be empty?: Any field that might reasonably be empty should probably be optional. However, a field that is usually empty may not be particularly useful or relevant. ; How likely is the field to be empty?: Any field that might reasonably be empty should probably be optional. However, a field that is usually empty may not be particularly useful or relevant.
; Can the field name be reused from elsewhere?: For instance, if adding a field for the date on which the subject died, to a biographical infobox template, use {{para|death_date}} from {{Tl|Infobox person}}, and not a similar name like {{para|date_of_death}} or {{para|died}}.

; Is it for people, places or organisations?: If so, include an ] microformat{{snd}}see ]
; Can the field name be reused from elsewhere?: For instance, if adding a field for the date on which the subject died, to a biographical infobox template, use {{Para|death_date}} from {{Tl|Infobox person}}, and not a similar name like {{Para|date_of_death}} or {{Para|died}}.
; Is it for a dated event?: (Such as a record release, or sport fixture) If so, include an ] microformat{{snd}}see ]

; Is it for people, places or organisations?: If so, include an ] ]—see ]

; Is it for a dated event?: (Such as a record release, or sport fixture) If so, include an ] ]—see ]


===Geographical infoboxes=== ===Geographical infoboxes===
{{shortcut|MOS:INFOBOXGEO}}
Infoboxes for geographical items should generally be headed with the article title, although the formal version of a name (e.g. ''Republic of Montenegro'' at ]) can be substituted. Alternate or native names can appear beneath this. Extensive historic names are often better in a second infobox, as at ].
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'' at ]) 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'' at ]). Alternative or native names can appear beneath this if beneficial. Extensive historic names are often better in a second infobox, as at ].

===Causes of inconsistency===
A number of factors can cause inconsistency in available summary information for a particular type of article:

; Historical incompleteness : Certain desired information may simply have been lost over time. For example, an infobox describing a modern bank may provide certain financial information that would be unavailable for a medieval one.

; Hierarchical inconsistency : Infoboxes that indicate hierarchical relationships may have subtly different requirements depending on where in the hierarchy the subject of the article is located. For example, an infobox for corporations will be different between an article describing a parent company and indicating its subsidiaries and an article describing a subsidiary and indicating its parent.

; Feature inconsistency : Items within a single set may have optional features that would commonly be listed in an infobox. For example, an infobox for an article about a university may include a motto; but not all universities have them.

; Lack of information : Some items in infoboxes may not be readily available or not available at all, such as the producers of an album or film. In these cases it is better to provide available information while concealing fields for which information may not be available.


===Dynamic templates=== ===Dynamic templates===
Line 68: Line 82:


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: 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:
; Readers greatly outnumber editors : The most important group to consider are the casual readers of Misplaced Pages, who will never do any significant editing. Infobox templates that contain many blank fields, question marks, or "Unknown"s present an unprofessional appearance.

; Readers greatly outnumber editors : The most important group to consider are the casual readers of Misplaced Pages, who will never do any significant editing. Infobox templates that contain many blank fields, question marks, or "Unknown"s present an unprofessional appearance, diminishing Misplaced Pages's reputation as a high-quality encyclopedia.

; Article editors greatly outnumber template editors: The average editor will merely use templates without making changes to them. To make things easier for them, we should aim to minimize the number of different templates they must be familiar with; creating multiple forks of templates is therefore undesirable. ; Article editors greatly outnumber template editors: The average editor will merely use templates without making changes to them. To make things easier for them, we should aim to minimize the number of different templates they must be familiar with; creating multiple forks of templates is therefore undesirable.

===Requirement===
Assess the requirement of a new infobox before designing one. A few points should be considered while initiating a new infobox:
# Sufficient and appropriate distinct parameters
# Can't be addressed by the existing infoboxes
# Can't be addressed by creating a wrapper of existing infoboxes


== Implementations == == Implementations ==
Basing a new infobox template on ] 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.

=== Conditional templates === === Conditional templates ===
{{main|mw:Help:Extension:ParserFunctions}} {{main|mw:Help:Extension:ParserFunctions}}
Special "templates" that selectively show or hide particular content (such as table rows) within an infobox based on the value of one or more template parameters. 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:
<pre>
<syntaxhighlight lang="wikitext">
{{#if:{{{party|}}}|<tr><th>Political party</th><td>{{{party|}}}</td></tr>|}}
| caption = {{#if:{{{image|}}}|{{{caption|}}} }}
</pre>
</syntaxhighlight>


=== Name-resolved meta-templates === === Name-resolved meta-templates ===
Several sub-templates (or even independent templates) with a common name prefix. <!-- That's a fragment; it has no verb--> They are included in an infobox based on the value of a particular parameter, which acts as the name suffix. For example, we create <code><nowiki>{{Infobox Ship/Military}}</nowiki></code> and <code><nowiki>{{Infobox Ship/Civilian}}</nowiki></code> and use <code><nowiki>{{Infobox Ship/{{{type}}}}}</nowiki></code>. Using <code>|type=Military</code> in an article causes <code><nowiki>{{Infobox Ship/Military}}</nowiki></code> to be used. 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 <code><nowiki>{{Infobox Ship/Military}}</nowiki></code> and <code><nowiki>{{Infobox Ship/Civilian}}</nowiki></code> and use <code><nowiki>{{Infobox Ship/{{{type}}}}}</nowiki></code>. Using <code>|type=Military</code> in an article causes <code><nowiki>{{Infobox Ship/Military}}</nowiki></code> to be used.


=== Multi-part infoboxes === === Multi-part infoboxes ===

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, ]. 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, ].


Line 92: Line 112:
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. 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 the ] group wanted to design a template based on their static Infobox, they could use ], and design a project-specific template with only additional information, and the pages would render both "stacked" together. For example, if the ] group wanted to design a template based on their static infobox, they could use ], and design a project-specific template with only additional information, and the pages would render both "stacked" together.


== Using infoboxes in articles == == Using infoboxes in articles ==
{{shortcut|MOS:INFOBOXUSE}}


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 through ] at each individual article. When used however, the meaning given to each infobox part should be the same across instances of that type 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". 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 through ] among the editors at each individual article.
The meaning given to each infobox part should be the same across instances of that ]. 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. Each infobox type should have documentation giving instruction on how each part/field may be used.


Like ], infoboxes should generally not contain flag icons. For more information about flag icons, and exceptions to the general guideline, see ].
== List of templates ==

:''See ] for the main listing. See also any relevant ]s, and a .''
=== References in infoboxes ===
{{shortcut|MOS:INFOBOXREF|MOS:INFOBOXCITE}}
<!-- this subsection based on consensus at ] -->

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 (see ] 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.

=== Ethnicity in infoboxes ===
{{shortcut|MOS:INFOBOXETH|MOS:INFOBOXETHNICITY}}
The Misplaced Pages community has decided at ] not to allow the use of an {{para|ethnicity}} parameter in biography infoboxes.

=== Religion in infoboxes ===
{{shortcut|MOS:INFOBOXREL|MOS:INFOBOXRELIGION}}
The Misplaced Pages community has decided at ] not to allow the use of a {{para|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. {{tlx|Infobox clergy}}.

=== Nationality and citizenship in infoboxes ===
{{shortcut|MOS:INFONAT|MOS:INFOBOXNTLY}}

In biographies, a {{para|nationality}} field should not be used. This was previously available for ], but was often confused with ] or ].

A {{para|citizenship}} field can be used, with the following guidelines:
* Omit when this can be inferred from the birth country (almost all cases)
** This includes countries both with and without '']'' birthright citizenship. For example, we allow readers to assume that people born in Norway are citizens of Norway, and document known exceptions.
** This includes when citizenship changes due to sovereignty changes (e.g. when a colony attains independence) but is a group change that only depends on citizenship at birth.
** Make sure the birth country is visible (not just a link target) in the "birth_place" field, and that it is not anachronistic based on the birth date. For example: "], ], British Empire" (the colonizing country typically sets citizenship rules).
* Do not use for ethnicity or national identity.
* Citizenship or nationality can be noted if dual, naturalized, or an exception to the typical case.
* Be aware of ] and ]s to avoid incorrect assumptions.
* Include an inline citation and use a ], especially for biographies of living people.
* Use a country name (e.g. "Cuba") or legal category linked to an explanatory article (e.g. "]"), not a demonym (e.g. "Cuban" or "American"). Per ], use "United States" or "U.S." or "US", not "USA".
* If citizenship rights vary by territory, specify the territory, e.g. "] (])".
* Denote non-citizen national status by explicitly naming the legal status, e.g. "citizenship=] (])" or "citizenship=] (])"
* Do not omit previous values, and add very brief context to explain how or when a given status was acquired. For example:
** "United States (by birthplace), Switzerland (from parents)"
** "Germany (birth-1945), United States (since 1945)"
* In complicated cases, omit from the infobox and explain in the article body.

If needed to indicate legal nationality, use "national of" rather than "nationality", to avoid confusion with ethnicity.

=== Education in infoboxes ===
{{shortcut|MOS:INFOEDU}}
The {{para|alma mater}} parameter is a more concise alternative to (not addition to) the {{para|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 for ], who dropped out of Harvard to start Microsoft.
{{Help:Infobox/user style|guideline=yes}}


== See also == == See also ==
* ]
* ]
* ]


'''Other types of templates''': === List of templates ===
* ] – main listing
* ] are used primarily to insert simple "boilerplate" messages for ] or ] purposes.
* {{Look from|Infobox|Template}}, a freshly generated list of templates starting with "Infobox ..."
* ] are article footers designed to provide links to several related articles.

* ] are reserved for internal system use, and can only be modified by ].
=== Other infobox information===
* ]
* {{section link|Misplaced Pages:Template index/Cleanup#Infobox needed}}
* {{Look from|WikiProject Infobox|Misplaced Pages}}, a freshly generated list of relevant ]
* ]
* ], an ]
* ], an essay
* ], an essay
* ]


===Other types of templates===
<!--Categories-->
* ] – article footers designed to provide links to several related articles
]
* ] – messages displayed in Misplaced Pages's web interface boxes, reserved for internal system use and only modifiable by ]
]
* ] – directory of all templates
]
]


{{Manual of Style}}
<!--Other languages-->


]
]
] ]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]

Latest revision as of 07:38, 30 November 2024

Wikimedia project page "Misplaced Pages:Infobox" and "Misplaced Pages:Infoboxes" redirect here. For the WikiProject, see Misplaced Pages:WikiProject Infoboxes. For general help on creating infoboxes, see Help:Infobox.
This guideline is a part of the English Misplaced Pages's Manual of Style.
It is a generally accepted standard that editors should attempt to follow, though occasional exceptions may apply. Any substantive edit to this page should reflect consensus. When in doubt, discuss first on the talk page.
Shortcuts
Manual of Style (MoS)

Content
Formatting
Images
Layout
Lists
By topic area
Legal
Arts
Music
History
Regional
Religion
Science
Sports
Related guidelines

An infobox is a panel, usually in the top right of an article, next to the lead section (in the desktop version of Misplaced Pages), or after the first paragraph of the lead section of an article (in the mobile version), that summarizes key facts about the page's subject. Infoboxes may also include images or maps.

Misplaced Pages's infoboxes almost always use the template 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.

Purpose

Shortcuts

The purpose of an infobox is to 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.

Shortcut

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 the ISO 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 as DBpedia) in a granular and machine readable format, often using microformats. Infoboxes can also present data imported from Wikidata (e.g., Category:Infobox templates using Wikidata), although imported data must comply with English Misplaced Pages policies.

Design principles

WikiProject Infoboxes
List of infoboxes
Style and help
Cleanup
Talk page
Article
Building
To do

Style, color and formatting

Shortcut

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 guidelines WP:NBSP (use of non-breaking spaces), WP:MOSNUM (numbers and dates), and WP:COLOR (use of color) are likely to be particularly relevant. As with navigation templates, the purpose of infoboxes is to facilitate convenient access to specific information; they should not prioritize a decorative appearance.

Images

Shortcuts See also: Misplaced Pages:Image use policy § Displayed image size, and Misplaced Pages:Manual of Style/Images § Images for the lead

When adding an image to an infobox, thumbnails should NOT be used. Infobox templates should implement the InfoboxImage module to help with formatting of images so simply supplying the file name will work. For example, to use File: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. If InfoboxImage is not yet fully implemented in the infobox you are using, the same |alt=, |upright=, |title=, etc., options may be called using Extended 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.)

Consistency between infoboxes

Shortcut

For consistency the following guidelines apply:

  • Before creating a new infobox template, check first to see whether a suitable infobox already exists.
  • Name the template ] (some subject should be in the singular and capitalized as per normal usage—see Misplaced Pages:Article titles, e.g., "Infobox settlement" or "Infobox NFL player").
  • Use {{infobox}} template to create a new infobox.
  • The template should have a large, bold title line. Either a table caption or a header can be used for this. It should be named the common name of the article's subject but may contain the full (official) name; this does not need to match the article's Misplaced Pages title, but falling back to use that (with {{PAGENAMEBASE}}) is usually fine. It should not contain a link.
  • Parameters in infoboxes should:
    • be named, not numbered, to provide for future use.
    • use lower-case unless they are proper nouns.
    • be consistent between infoboxes. For example, {{Infobox person}} uses |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.
    • Use snake case (e.g. |birth_date=). Not camel case (e.g. |birthDate=) or title case (e.g. |BirthDate=)
    • represent spaces using an underscore, e.g. |birth_place= not |birth-place= or |birth place=.
  • Infoboxes using geographical coordinates should use |coordinates= as the parameter name, with the {{coord}} template in the parameter's value.
  • If a parameter is not applicable, or no information is available, it should be left blank, and the template coded to selectively hide information or provide default values for parameters that are not defined.

Causes of inconsistency

A number of factors can cause inconsistency in available summary information for a particular type of article:

Design inconsistency
Infoboxes, particularly infobox forks for the same category of articles, should maintain a consistent appearance with related infoboxes, particularly in relation to layout, colour and structure. For example, readers expect a degree of similarity when viewing the article for London vs New York City.
Historical incompleteness
Certain desired information may simply have been lost over time. For example, an infobox describing a modern bank may provide certain financial information that would be unavailable for a medieval one.
Hierarchical inconsistency
Infoboxes that indicate hierarchical relationships may have subtly different requirements depending on where in the hierarchy the subject of the article is located. For example, an infobox for corporations will be different between an article describing a parent company and indicating its subsidiaries and an article describing a subsidiary and indicating its parent.
Feature inconsistency
Items within a single set may have optional features that would commonly be listed in an infobox. For example, an infobox for an article about a university may include a motto; but not all universities have them.
Lack of information
Some items in infoboxes may not be readily available or not available at all, such as the producers of an album or film. In these cases it is better to provide available information while concealing fields for which information may not be available.

General design considerations

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:

Is the field of value?
How important is the field to the articles that will use the infobox? Is it summary information, or more extended detail that may be better placed within the body of an article?
Will the field be relevant to many of the articles that will use the infobox?
If the field is relevant to very few articles, it should probably not be included at all. Conversely, very common fields may be included – and made optional – even if they are not applicable to a few of the articles in question.
How likely is the field to be empty?
Any field that might reasonably be empty should probably be optional. However, a field that is usually empty may not be particularly useful or relevant.
Can the field name be reused from elsewhere?
For instance, if adding a field for the date on which the subject died, to a biographical infobox template, use |death_date= from {{Infobox person}}, and not a similar name like |date_of_death= or |died=.
Is it for people, places or organisations?
If so, include an hCard microformat – see the microformat project
Is it for a dated event?
(Such as a record release, or sport fixture) If so, include an hCalendar microformat – see the microformat project

Geographical infoboxes

Shortcut

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 at Montenegro) 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 at São Paulo (state)). Alternative or native names can appear beneath this if beneficial. Extensive historic names are often better in a second infobox, as at Augsburg.

Dynamic templates

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:

Readers greatly outnumber editors
The most important group to consider are the casual readers of Misplaced Pages, who will never do any significant editing. Infobox templates that contain many blank fields, question marks, or "Unknown"s present an unprofessional appearance.
Article editors greatly outnumber template editors
The average editor will merely use templates without making changes to them. To make things easier for them, we should aim to minimize the number of different templates they must be familiar with; creating multiple forks of templates is therefore undesirable.

Requirement

Assess the requirement of a new infobox before designing one. A few points should be considered while initiating a new infobox:

  1. Sufficient and appropriate distinct parameters
  2. Can't be addressed by the existing infoboxes
  3. Can't be addressed by creating a wrapper of existing infoboxes

Implementations

Basing a new infobox template on Template: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.

Conditional templates

Main article: mw:Help:Extension:ParserFunctions

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|}}} }}

Name-resolved meta-templates

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.

Multi-part infoboxes

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.

Interaction between multiple templates

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 the WikiProject Saints group wanted to design a template based on their static infobox, they could use Template:Infobox Biography, and design a project-specific template with only additional information, and the pages would render both "stacked" together.

Using infoboxes in articles

Shortcut

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 through discussion and consensus among the editors at each individual article.

The meaning given to each infobox part should be the same across instances of that type 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.

Like navigation templates, infoboxes should generally not contain flag icons. For more information about flag icons, and exceptions to the general guideline, see MOS:FLAG.

References in infoboxes

Shortcuts

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 (see WP: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.

Ethnicity in infoboxes

Shortcuts

The Misplaced Pages community has decided at this RfC not to allow the use of an |ethnicity= parameter in biography infoboxes.

Religion in infoboxes

Shortcuts

The Misplaced Pages community has decided at this 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}}.

Nationality and citizenship in infoboxes

Shortcuts

In biographies, a |nationality= field should not be used. This was previously available for legal nationality, but was often confused with national identity or ethnicity.

A |citizenship= field can be used, with the following guidelines:

  • Omit when this can be inferred from the birth country (almost all cases)
    • This includes countries both with and without jus soli birthright citizenship. For example, we allow readers to assume that people born in Norway are citizens of Norway, and document known exceptions.
    • This includes when citizenship changes due to sovereignty changes (e.g. when a colony attains independence) but is a group change that only depends on citizenship at birth.
    • Make sure the birth country is visible (not just a link target) in the "birth_place" field, and that it is not anachronistic based on the birth date. For example: "Kingston, Colony of Jamaica, British Empire" (the colonizing country typically sets citizenship rules).
  • Do not use for ethnicity or national identity.
  • Citizenship or nationality can be noted if dual, naturalized, or an exception to the typical case.
  • Be aware of citizenship and nationality laws to avoid incorrect assumptions.
  • Include an inline citation and use a reliable source, especially for biographies of living people.
  • Use a country name (e.g. "Cuba") or legal category linked to an explanatory article (e.g. "British Overseas citizen"), not a demonym (e.g. "Cuban" or "American"). Per MOS:USA, use "United States" or "U.S." or "US", not "USA".
  • If citizenship rights vary by territory, specify the territory, e.g. "British Overseas Territories citizen (Bermuda)".
  • Denote non-citizen national status by explicitly naming the legal status, e.g. "citizenship=British subject (Massachusetts Bay)" or "citizenship=United States national (American Samoa)"
  • Do not omit previous values, and add very brief context to explain how or when a given status was acquired. For example:
    • "United States (by birthplace), Switzerland (from parents)"
    • "Germany (birth-1945), United States (since 1945)"
  • In complicated cases, omit from the infobox and explain in the article body.

If needed to indicate legal nationality, use "national of" rather than "nationality", to avoid confusion with ethnicity.

Education in infoboxes

Shortcut

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 for Bill Gates, who dropped out of Harvard to start Microsoft.

Infoboxes and user style

Users can have user CSS that hides any infoboxes in their own browsers.

To hide all infoboxes, add the following to Special:MyPage/common.css (for all skins, or Special: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 to your common.js or into a browser user script that is executed by an extension like Greasemonkey:

$('.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.

See also

List of templates

Other infobox information

Other types of templates

Manual of Style
Content
Formatting
Images
Layout
Lists
By topic area
Legal
Arts
Music
History
Regional
Religion
Science
Sports
Related guidelines
Search
Categories: