• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Election table

  • Template
  • Talk
  • Language
  • Watch
  • View source
(Redirected from Template:Election-table)
Template documentation[view] [edit] [history] [purge]

Usage

This template marks the beginning of a table and defines borders, margins, background colours, and text alignment within the table. (Default alignment is "right", others must be specified.) Table rows and cells are written as usual, and the table is closed with "|}"

For example, to have a table as shown below, include the code shown to the right:

{{Election table|title=Summary of [[Mars|Martian]] election results, 2020}}
|-
! colspan="2" style="text-align:left;" | Parties
! Votes
! %
! ±
! Seats
! ±
|-
| style="background-color:#ff0000;" |
| style="text-align:left;" | The red party
| 6042
| 45.40
| −4.41
| 23
| −2
|-
| style="background-color:#00ff00;" |
| style="text-align:left;" | The green party
| 5678
| 42.67
| +1.23
| 21
| 0
|-
| style="background-color:#0000ff;" |
| style="text-align:left;" | Free Mars
| 345
| 2.59
| +2.59
| 1
| +1
|-
| style="background-color:#eeeeee;" |
| style="text-align:left;" | None of the above (unfilled seats)
| 1242
| 9.33
| +0.59
| 5
| +1
|-
! colspan="2" style="text-align:left;" | Total
! 13307
! style="text-align:center;" colspan="2"| 100%
! style="text-align:center;" colspan="2"| 50
|}
Summary of Martian election results, 2020
Parties Votes % ± Seats ±
The red party 6042 45.40 −4.41 23 −2
The green party 5678 42.67 +1.23 21 0
Free Mars 345 2.59 +2.59 1 +1
None of the above (unfilled seats) 1242 9.33 +0.59 5 +1
Total 13307 100% 50

Options

Instead of {{Election table|template_name=template pagename}} Title you can use {{Election table|template_name=template pagename|title=Title}}. The title will be bolded automatically.

To add class="sortable", use ...|sortable=yes}}. If you use this, you will need to edit your table to have |- class="sortbottom" as the row separator for the total row. If you want a specific column not to be sortable, specify class="unsortable" in the attributes of its header cell. Sorted tables do not currently work with tables using colspan. See Help:Sorting for more information about sorting.

To align the table on the right side of the page, use ...|align=right}}.

For direct use in an article instead of a template, do not include the template_name parameter.

To collapse the table, use ...|collapsed=yes

election

  • Category:Pages using election table with unknown parameters (0)
  • Category:Pages using election table with incorrect edit links (5)
The above documentation is transcluded from Template:Election table/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Election_table&oldid=1118598769"
Last edited on 27 October 2022, at 21:54

Languages

    • Afrikaans
    • العربية
    • অসমীয়া
    • Авар
    • Azərbaycanca
    • Basa Bali
    • বাংলা
    • Башҡортса
    • Беларуская (тарашкевіца)
    • भोजपुरी
    • Български
    • Català
    • Dansk
    • Ελληνικά
    • فارسی
    • Føroyskt
    • Français
    • ગુજરાતી
    • 한국어
    • हिन्दी
    • Bahasa Indonesia
    • ქართული
    • Kiswahili
    • Lietuvių
    • Magyar
    • मैथिली
    • Македонски
    • മലയാളം
    • मराठी
    • مازِرونی
    • Bahasa Melayu
    • Монгол
    • नेपाली
    • 日本語
    • Norsk bokmål
    • ଓଡ଼ିଆ
    • ਪੰਜਾਬੀ
    • ភាសាខ្មែរ
    • Tok Pisin
    • Português
    • Română
    • Русский
    • संस्कृतम्
    • Scots
    • සිංහල
    • Simple English
    • سنڌي
    • Slovenščina
    • کوردی
    • Српски / srpski
    • Suomi
    • Tagalog
    • తెలుగు
    • ไทย
    • Türkçe
    • Українська
    • اردو
    • Tiếng Việt
    • 中文
    Wikipedia
    • Wikimedia Foundation
    • Powered by MediaWiki
    • This page was last edited on 27 October 2022, at 21:54 (UTC).
    • Content is available under CC BY-SA 4.0 unless otherwise noted.
    • Privacy policy
    • About Wikipedia
    • Disclaimers
    • Contact Wikipedia
    • Code of Conduct
    • Developers
    • Statistics
    • Cookie statement
    • Terms of Use
    • Desktop