Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a23e487fc986a594

Jump to content

Template:Election box/doc

From Wikipedia, the free encyclopedia

These election box templates are for displaying a list of candidates and results for any election. They produce tables like this (figures are just examples; they are not meant to work mathematically):

2005 general election: Strangford
Party Candidate Votes % ±%
Conservative John Smith 101,549 63.8 +6.2
Labour Jane Johnson 52,201 31.6 −8.2
Majority 153,700 72.4 +5.4
Turnout 9,999 50.0 +10.0
Registered electors 319,998 +3.6

Usage

[edit]

Basic

[edit]

There are three basic templates:

The begin and end templates start and end a table with appropriate columns and formatting. The candidate template is used once for each candidate and contributes a row to the table.

When using this template please use the election box end template rather than simply inserting |} at the end of the election box. For example:

{{Election box begin|title=[[2005 United Kingdom general election|2005 general election]]: Strangford}}
{{Election box candidate
 | party      = Labour
 | candidate  = Tony Blair
 | votes      = 9,999
 | percentage = 50.0
 | change     = +10.0
}}
{{Election box candidate
 | party      = Conservative
 | candidate  = Michael Howard
 | votes      = 9,999
 | percentage = 50.0
 | change     = +10.0
}}
{{Election box end}}

…will create this:

2005 general election: Strangford
Party Candidate Votes % ±%
Labour Tony Blair 9,999 50.0 +10.0
Conservative Michael Howard 9,999 50.0 +10.0
[edit]

See Template:Election box candidate with party link for usage and set-up.

Majority and turnout

[edit]

Three further templates…

…can be added to record the majority, turnout and number of registered electors for an election. (In this context, "majority" refers to the winning margin between the first and second placed candidates.)

For example:

{{Election box majority
 | votes      = 9,999
 | percentage = 50.0
 | change     = +10.0
}}
{{Election box turnout
 | votes      = 9,999
 | percentage = 50.0
 | change     = +10.0
}}
{{Election box registered electors
 | reg. electors = 19,998
 | ref           =
 | change        = +2.3
}}
{{Election box end}}

…will create this:

2005 general election: Strangford
Party Candidate Votes % ±%
Labour Tony Blair 9,999 50.0 +10.0
Conservative Michael Howard 9,999 50.0 +10.0
Majority 9,999 50.0 +10.0
Turnout 9,999 50.0 +10.0
Registered electors 19,998 +2.3

Election outcome

[edit]

Finally there are two templates:

that can be used to summarise the outcome of an election, in terms of whether the incumbent holds the seat or whether it is lost to another party. For example:

{{Election box hold with party link
 | winner     = Labour Party (UK)
 | swing      = +10.0
}}

or…

{{Election box gain with party link
 | winner     = Conservative Party (UK)
 | loser      = Labour Party (UK)
 | swing      = +10.0
}}
{{Election box end}}

…will create this:

2005 general election: Strangford
Party Candidate Votes % ±%
Labour Tony Blair 9,999 50.0 +10.0
Conservative Michael Howard 9,999 50.0 +10.0
Majority 9,999 50.0 +10.0
Turnout 9,999 50.0 +10.0
Registered electors 19,998 +9.9
Labour hold Swing +10.0

…or this:

0

2005 general election: Strangford
Party Candidate Votes % ±%
Labour Tony Blair 9,999 50.0 +10.0
Conservative Michael Howard 9,999 50.0 +10.0
Majority 9,999 50.0 +10.0
Turnout 9,999 50.0 +10.0
Registered electors 19,998 +9.9
Conservative gain from Labour Swing +10.0

TemplateData

[edit]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Election box in articles based on its TemplateData.

TemplateData for Election box

The template [[Template:Election box]] is not itself a real template. Instead, there are a family of other templates which together create a results table. See this template's page for how to use [[Template:Election box begin]], [[Template:Election box candidate]] and others to create an election results table.

Template parameters

ParameterDescriptionTypeStatus
No parameters specified

List of templates

[edit]

Election box begin

[edit]

Election box candidate

[edit]

Standard

[edit]

Winning

[edit]

Inline

[edit]

Election summary

[edit]

For parties without an article on Wikipedia.

Election box gain, hold, loss, etc.

[edit]

Election box majority

[edit]

Election box turnout

[edit]
[edit]

Election box end

[edit]

Blanks by country

[edit]

Extensions

[edit]

See also

[edit]