Template:Glossary/doc: Difference between revisions
| [checked revision] | [checked revision] |
Caleb Cooper (talk | contribs) No edit summary |
Caleb Cooper (talk | contribs) m Text replacement - "[[HTML" to "[[Wikipedia:HTML" |
||
| Line 3: | Line 3: | ||
=={{#ifeq:{{BASEPAGENAME}}|Glossary|Usage|[[Template:Glossary]]}}== |
=={{#ifeq:{{BASEPAGENAME}}|Glossary|Usage|[[Template:Glossary]]}}== |
||
{{#ifeq:{{BASEPAGENAME}}|Glossary|<!--nothing-->|{{collapse top|heading=Usage|left=y}} }} |
{{#ifeq:{{BASEPAGENAME}}|Glossary|<!--nothing-->|{{collapse top|heading=Usage|left=y}} }} |
||
The template {{tlx|glossary}} (a.k.a. {{tnull|glossary start}} or {{tnull|glossary begin}}) is used with {{tlx|glossary end}} to explicitly bracket a glossary or glossary-like description list (also called a definition list or association list), especially in a [[Wikipedia:Manual of Style/Glossaries|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 {{tag|dl}} ''description list'' [[HTML Element#Lists|HTML element]]. Unfortunately, the "{{tlf|dl}}" mnemonic is not available as a redirect as of this writing. |
The template {{tlx|glossary}} (a.k.a. {{tnull|glossary start}} or {{tnull|glossary begin}}) is used with {{tlx|glossary end}} to explicitly bracket a glossary or glossary-like description list (also called a definition list or association list), especially in a [[Wikipedia:Manual of Style/Glossaries|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 {{tag|dl}} ''description list'' [[Wikipedia:HTML Element#Lists|HTML element]]. Unfortunately, the "{{tlf|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 ({{tag|dl}}) around terms and definitions if they have blank lines between them, as they often do, especially in non-structured glossaries. |
The pair of templates incidentally prevent Wikipedia's [[MediaWiki]] software engine from auto-creating redundant definition list code ({{tag|dl}}) around terms and definitions if they have blank lines between them, as they often do, especially in non-structured glossaries. |
||
Revision as of 16:22, 21 October 2020
| This page was automatically imported from Commons any changes will be overwritten, the source page is here () |
Template:Glossary
Usage
| ||
|---|---|---|
|
The template The pair of templates incidentally prevent Wikipedia's MediaWiki software engine from auto-creating redundant definition list code ( Typical usage: {{glossary}} Template:Gray Template:Gray {{glossary end}}
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}}):
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:
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. |