Home  

Random  

Nearby  



Log in  



Settings  



Donate  



About Wikipedia  

Disclaimers  



Wikipedia





Template:Legend





Template  

Talk  



Language  

Watch  

View source  





Shows a legend row with a colored box.

Usage

{{legend|background-color|caption|outline=outline color|border=css border}}

Examples

Use in text

{{legend|black|Africa}}
{{legend|green|Americas}}
{{legend|blue|Oceania}}
{{legend|#ffa|Europe|outline=silver}}
{{legend|#ff2800|Asia|outline=#A2A9B1}}  (#A2A9B1 is the wikitables border color.)
  Africa
  Americas
  Oceania
  Europe
  Asia

Use in captions

Markup Renders as
 [[File:Celts in Europe.png|upright=.9|thumb|right|The Celts in Europe, past and present:
 {{legend|#1a8000|Present-day Celtic-speaking areas}}
 {{legend|#27c600|Other parts of the six most commonly recognized "Celtic nations" and where a Celtic language is spoken but not the dominating language}}
 {{legend|#97ffb6|Other parts of Europe once peopled by Celts; modern-day inhabitants of many of these areas often claim a Celtic heritage and/or culture}}
 {{legend|#D2FFD2|Lusitanian area of Iberia, "Celticity" uncertain}}
 {{legend|yellow|The core Hallstatt territory, expansion before 500 BC}}
 ]]
The Celts in Europe, past and present:
  Present-day Celtic-speaking areas
  Other parts of the six most commonly recognized "Celtic nations" and where a Celtic language is spoken but not the dominating language
  Other parts of Europe once peopled by Celts; modern-day inhabitants of many of these areas often claim a Celtic heritage and/or culture
  Lusitanian area of Iberia, "Celticity" uncertain
  The core Hallstatt territory, expansion before 500 BC

Use with all parameters

{{legend
| #ded <!--light green-->
| The meadow is green.
| outline   = #00e <!--blue >> will be not used because overridden by border-parameter-->
| border    = 2px solid #e00 <!--red-->
| textcolor = #00e <!--blue-->
| size      = 200%
| text      = green
}}
green  The meadow is green.

Full parameter list

{{legend
| [legend box's colo(u)r]
| [text following legend box]
| outline =   <!--colo(u)r of border around legend box-->
| border =    <!--use to specify custom CSS styling for border (overrides 'outline')-->
| textcolor = <!--colo(u)r of 'text'-->
| size =      <!--'text' font-size-->
| text =      <!--to place text inside the legend box-->
}}

Limitations

Using certain special characters in |text= that have meaning in wikitext can cause unexpected results. To use *in|text=, use |text={{asterisk}}. To use # in |text=, use |text={{number sign}}.

See also

Templates that list colors

TemplateData

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

TemplateData for Legend

Shows a legend row with a colored box and a caption.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Color1

The color for the legend entry, in any CSS format

Example
"#6D6E00", "#ffa", "yellow"
Linerequired
Caption2

Label for the legend entry

Example
"soda" is most common
Stringsuggested
CSS border styleborder

CSS style for the legend entry's border

Stringoptional
Entry outlineoutline

CSS color for the outline of the legend entry

Example
silver
Lineoptional
Text in the entrytext

Text to be displayed in the legend entry box, i.e. within the color specified

Example
Af
Lineoptional
Text colortextcolor

CSS color of text inside the legend's colored box

Stringoptional
Sizesize

Font size of the legend entry, including colored box

Stringoptional

Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Legend&oldid=1099569977"
 



Last edited on 21 July 2022, at 13:18  


Languages

 


Afrikaans
Alemannisch
Алтай тил
Anarâškielâ
ि
Ænglisc
Аԥсшәа
العربية
Aragonés
Արեւմտահայերէն
Arpetan

Asturianu
Avañe'
Aymar aru
Azərbaycanca
تۆرکجه
Basa Bali

Banjar
 / Bân-lâm-gú
Basa Banyumasan
Башҡортса
Беларуская
Беларуская (тарашкевіца)

Bikol Central
Български
Boarisch

Bosanski
Brezhoneg
Буряад
Català
Чӑвашла
Cebuano
Čeština
Corsu
Cymraeg
Dagbanli
Dansk
الدارجة
Deutsch
ދިވެހިބަސް
Dolnoserbski

Eesti
Ελληνικά
Emiliàn e rumagnòl
Эрзянь
Español
Esperanto
Estremeñu
Euskara
Eʋegbe
فارسی
Føroyskt
Français
Frysk
Fulfulde
Furlan
Gaeilge
Gàidhlig
Galego
ГӀалгӀай

Gĩkũyũ

/Hak-kâ-ngî

Հայերեն
ि
Hornjoserbsce
Hrvatski
Bahasa Hulontalo
Ido
Ilokano
Bahasa Indonesia
Interlingua
Ирон
IsiZulu
Íslenska
Italiano
עברית
Jawa


Қазақша
Kernowek
Ikirundi
Коми
Kurdî
Кыргызча
Ladin
Ladino
Latgaļu
Latina
Latviešu
Lëtzebuergesch
Lietuvių
Ligure
Limburgs
Lingála
La .lojban.
Lombard
Magyar
ि
Македонски

Malti
Māori

مصرى

مازِرونی
Bahasa Melayu
Minangkabau
 / Mìng-dĕ̤ng-nḡ
Mirandés
Мокшень
Монгол

Nāhuatl
Nederlands
Nedersaksies


Napulitano
Нохчийн
Nordfriisk
Norsk bokmål
Norsk nynorsk
Олык марий
ି
Oʻzbekcha / ўзбекча
ि

Papiamentu
پښتو
Patois

Tok Pisin
Polski
Português
Română
Romani čhib
Runa Simi
Русский
Саха тыла

Sardu
Scots
Seeltersk
Sesotho
Shqip

Simple English
سنڌي
Slovenčina
Slovenščina
Словѣньскъ / 
Ślůnski
کوردی
Sranantongo
Српски / srpski
Srpskohrvatski / српскохрватски
Sunda
Suomi
Svenska
Tagalog
ி
Taclit
Taqbaylit
Татарча / tatarça
 



Тоҷикӣ
Türkçe
Тыва дыл
Українська
اردو
ئۇيغۇرچە / Uyghurche
Vèneto
Vepsän kel
Tiếng Vit
Volapük

West-Vlams

ייִדיש

Zazaki

Fɔ̀ngbè
 

Wikipedia


This page was last edited on 21 July 2022, at 13:18 (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