Template:Glossary end
From The Kodiak Republic Wiki
Template documentation (for the above template, sometimes hidden or invisible)
Usage
The template {{glossary}}
(a.k.a. {{glossary start}}
or {{glossary begin}}
) is used with {{glossary end}}
to explicitly bracket a glossary or glossary-like description list (also called a definition list or association list), especially in a template-structured glossary, although such lists can be used more generally. This is required (as a technical matter) for template-structured glossaries, and is good practice anywhere description/definition lists are used for glossaries. The template pair invoke the <dl>...</dl>
description list HTML element. Unfortunately, the "{{dl}}" mnemonic is not available as a redirect as of this writing.
The pair of templates incidentally prevent Wikipedia's MediaWiki software engine from auto-creating redundant definition list code (<dl>...</dl>
) around terms and definitions if they have blank lines between them, as they often do, especially in non-structured glossaries.
Typical usage:
{{glossary}} {{term}} {{defn}} {{glossary end}}
Parameters
|id=
can be used to assign a one-word ID name to the glossary. This can be used as a#id
link target, and could have other metadata uses.|style=
will pass CSS styling on to the<dl>
element. I.e., this styles the definition list itself, as a container, not the individual terms and definitions with it. There is rarely any reason to do this.|class=
will pass one or more space-separate CSS classes on to<dl>
element, in addition to the automatically included classglossary
. There is rarely any reason to do this.
Examples
This shows both a very simple then a rather complex instance in a structured glossary (including an entry with a block quotation, using the glossary block quotation template, {{gbq}}):
==A–M==
{{glossary}}
{{term|1=applesnorkel}}
{{defn|1=Definition of term 1.}}
{{term|term=arglefarst |content={{lang|xx|arglefarst}}{{anchor|argle-farst|argle farst}} }}
{{defn|no=1 |defn=Beginning of first definition of term 2
{{gbq|1=Block quotation in first definition of term 2.}}
Conclusion of first definition of term 2.
}}
{{defn|no=2 |defn=Second definition of term 2.}}
{{glossary end}}
|
|
Scope
This family of templates, like the underlying definition list code, is primarily intended for definitional uses, but can have other applications. The HTML 4.01 Specification itself says: Lua error in package.lua at line 80: module 'Dev:Quote' not found.
Thus, editors should feel free to use definition list markup as an alternative to bulleted or numbered lists when the material is well-suited to definition list presentation.
See also
Visit Template:Glossary end/doc to edit this text! (How does this work?)