Template:Term/doc: Difference between revisions
| [checked revision] | [checked revision] |
Content deleted Content added
Caleb Cooper (talk | contribs) Created page with "{{#ifeq:{{BASEPAGENAME}}|Term|{{Documentation subpage}}|}} {{Commons Import}} =={{#ifeq:{{BASEPAGENAME}}|Term|Usage|Template:Term}}== {{#ifeq:{{BASEPAGENAME}}|Term|<!--not..." |
Caleb Cooper (talk | contribs) m Text replacement - "[[HTML" to "[[Wikipedia:HTML" |
||
| (One intermediate revision by the same user not shown) | |||
Line 3:
=={{#ifeq:{{BASEPAGENAME}}|Term|Usage|[[Template:Term]]}}==
{{#ifeq:{{BASEPAGENAME}}|Term|<!--nothing-->|{{collapse top|heading=Usage|left=y}} }}
The template {{tlx|term}} is used in [[Wikipedia:Manual of Style/Glossaries|template-structured glossaries]] to create terms to be defined, that are properly structured, have [[Separation of presentation and content|semantic value]], and can be linked to as if independent sections. It is a wrapper for {{tag|dt}}, the ''description list term'' [[Wikipedia:HTML element#Lists|HTML element]]. The template has a mnemonic redirect at {{tlx|dt}}.
Basic usage:
Line 31:
|{{fake heading|Wiki-styling and linking of the term|sub=3}} }}
If the second or {{para|content}} parameter is styled with wikimarkup, linked, or otherwise altered inside the template, the term <em>must</em> also be retained in unstyled form as the first or {{para|term}} parameter. Failing to do so will cause the template to malfunction, since it must have a "clean" term name to use as the <code>id</code> of the element, for linking purposes, among other reasons. The order intentionally mirrors that of [[Wikipedia:WP:PIPE|piped wikilinking]] (<code><nowiki>[[</nowiki><var>title</var>|<var>styled</var>]]</code>).
*{{xt|Correct}}: {{tlc|term|1{{=}}esprit de corps |2{{=}}<nowiki>''esprit de corps''</nowiki>}}
*{{!xt|Wrong}}: {{tlc|term|1{{=}}<nowiki>''esprit de corps''</nowiki>}}
Line 274:
|{{fake heading|Technical details|sub=3}} }}
What this template does on the technical level is wrap the {{var|term}} in the {{tag|dfn}} [[Wikipedia:HTML element]] to semantically mark the term as the {{em|defining instance}} on the page of the defined term, and puts this marked-up content inside a {{tag|dt}} ''term'' element of a {{tag|dl}} description list (a.k.a. definition list, association list; the list is generated by the {{tlx|glossary}} and {{tlx|glossary end}} templates), and gives CSS <code>class="glossary"</code> to the {{tag|dt|o}} element. That class isn't doing anything yet, but it could later, like a slight font size increase.
{{#ifeq:{{BASEPAGENAME}}|Term|
| |||