Changes
Jump to navigation
Jump to search
→top: make that actually work (looks right in Chrome on Mac, anyway – may need tweaks to work universally, to stop the {{PlayStation key press}} output from overlapping the {{key top}} and {{button}} output)
{{Navbox
| name = Semantic markup templates
| state = {{{state|{{{1|<includeonly>collapsed</includeonly>}}}}}}
| title = {{c|Semantic markup templates}}
| liststyle = font-size:110%;
| tracking = no <!-- keep the documented templates out of the hlist tracking category -->
| list1 =
{{Aligned table
|cols=3 |class=sortable |style=line-height:1.35em;text-align:left;
|colstyle=<!--vertical-align:middle;-->padding-right:1.0em;
|col2style=white-space:nowrap; |col3style=white-space:normal;
|row1style=line-height:1.6em;
|row1header=on
| Template | Example output | Use
| {{tlxb|strong}} | {{strong|Important!}} | To indicate [[HTML element#strong|<nowiki><strong></nowiki>]] importance, seriousness, or urgency instead of just simple typographical boldfacing
| {{tlxb|strongbad}} | "{{strongbad|Never}} use ..." | Same as {{braces|strong}} but in red
| {{tlxb|stronggood}} | "{{stronggood|Only}} use ..." | Same as {{braces|strong}} but in green
| {{tlxb|em}} | "An {{em|emphatic phrase}}" | To indicate [[HTML element#em|<nowiki><em></nowiki>]] stress emphasis (not just purely typographical italicization like for book titles or foreign terms)
| {{tlxb|var}} | {{var|strPrefix}} | To indicate text is a variable name. Use for any variable names except those including "I" (uppercase i) and/or "l" (lowercase L); for these, {{braces|varserif}} should be used to ensure a noticeable distinction
| {{tlxb|varserif}} | {{varserif|strIllustratePrefix}} | (see {{braces|var}} above)
| {{tlxb|tld}} | {{tld|DEFAULTSORT:Y, X}} | To display wikicode variables and [[Help:Magic words|magic words]] as they would appear in code
| {{tlxb|para}} | {{para|year|2008}} | To display template parameters with or without values
| {{tlxb|param}} | {{param|title|alt}} | To display parameters as used in code (i.e. with triple braces), especially to indicate relationships between them. May be combined with {{braces|para}} above
| {{tlxb|tlx}} etc. | {{tlx|Template|{{var|1}}|{{var|2}}|...|{{var|10}}}} | To display a template call (with or without parameters and values) as code
| {{tlxb|tag}} | {{resize|95%|"The {{tag|img}} tags ..."}} | To render [[HTML element]]s ("tags") in prose
| {{tlxb|code}} | {{nowrap|{{resize|95%|"Ensure the {{code|1=alt=}} parameter ..."}}}} | To indicate text is source code. To nest other templates within {{braces|code}}, use {{tag|code}}
| {{tlxs|codenowiki}} | {{longitem|style=font-size:95%;font-family:monospace; |<code><nowiki> {{var|code}} ...<br />... </nowiki></code>}} | To wrap example code in {{tag|code|o}} and nested {{tag|nowiki|o}} tags
| {{tlxb|syntaxhighlight}} | <sub>[this is a block template]</sub> | ({{thinsp|or {{tlx|sxhl}}}}) Wrapper for {{tag|syntaxhighlight}}, but will wrap overflowing text
| {{tlxb|deprecated code}} | "Do not use {{tag|{{deprecated code|blink}}|o}}." | ({{thinsp|or {{tlx|dc}}}}) To indicate [[Deprecation|deprecated]] source code in template documentation, articles on HTML specs, etc. The {{tlx|dc2}} variant uses {{nowrap|strike-through}} ({{tag|{{dc2|blink}}|o}}) while {{tlx|dcr}} uses red ({{tag|{{dcr|blink}}|o}}).
| {{tlxb|pre}} | <sub>[this is a block template]</sub> | For larger blocks of source code and other pre-formatted text
| {{tlxb|quote}} | <sub>[this is a block template]</sub> | For block quotations (only – never for non-quotations)
| {{tlxb|block indent}} | <sub>[this is a block template]</sub> | For indented blocks of material; visually identical to {{tlx|quote}} but without quote markup
| {{tlxb|kbd}} | {{kbd|user input}} | To indicate user input
| {{tlxb|key press}} | {{key press|Ctrl|x}} | To indicate specific-keystroke input, including combinations
| {{tlxb|key top}} | {{key top|Left shift}} | Similar; includes more symbols, but does not directly support combinations
| {{tlxb|PlayStation key press}} | {{lower|0.17em|{{PlayStation key press|square}}}} | To indicate PlayStation-style gamepad key presses<span style{{=}}"display: inline-block; padding-top: 0.3em; padding-bottom: 0.1em;"> </span>
| {{tlxb|button}} | {{button|Don't save}} | To indicate a button in a user interface
| {{tlxb|samp}} | {{samp|example output}} | To indicate sample or example output
}}
}}<noinclude>{{Documentation}}</noinclude>
| name = Semantic markup templates
| state = {{{state|{{{1|<includeonly>collapsed</includeonly>}}}}}}
| title = {{c|Semantic markup templates}}
| liststyle = font-size:110%;
| tracking = no <!-- keep the documented templates out of the hlist tracking category -->
| list1 =
{{Aligned table
|cols=3 |class=sortable |style=line-height:1.35em;text-align:left;
|colstyle=<!--vertical-align:middle;-->padding-right:1.0em;
|col2style=white-space:nowrap; |col3style=white-space:normal;
|row1style=line-height:1.6em;
|row1header=on
| Template | Example output | Use
| {{tlxb|strong}} | {{strong|Important!}} | To indicate [[HTML element#strong|<nowiki><strong></nowiki>]] importance, seriousness, or urgency instead of just simple typographical boldfacing
| {{tlxb|strongbad}} | "{{strongbad|Never}} use ..." | Same as {{braces|strong}} but in red
| {{tlxb|stronggood}} | "{{stronggood|Only}} use ..." | Same as {{braces|strong}} but in green
| {{tlxb|em}} | "An {{em|emphatic phrase}}" | To indicate [[HTML element#em|<nowiki><em></nowiki>]] stress emphasis (not just purely typographical italicization like for book titles or foreign terms)
| {{tlxb|var}} | {{var|strPrefix}} | To indicate text is a variable name. Use for any variable names except those including "I" (uppercase i) and/or "l" (lowercase L); for these, {{braces|varserif}} should be used to ensure a noticeable distinction
| {{tlxb|varserif}} | {{varserif|strIllustratePrefix}} | (see {{braces|var}} above)
| {{tlxb|tld}} | {{tld|DEFAULTSORT:Y, X}} | To display wikicode variables and [[Help:Magic words|magic words]] as they would appear in code
| {{tlxb|para}} | {{para|year|2008}} | To display template parameters with or without values
| {{tlxb|param}} | {{param|title|alt}} | To display parameters as used in code (i.e. with triple braces), especially to indicate relationships between them. May be combined with {{braces|para}} above
| {{tlxb|tlx}} etc. | {{tlx|Template|{{var|1}}|{{var|2}}|...|{{var|10}}}} | To display a template call (with or without parameters and values) as code
| {{tlxb|tag}} | {{resize|95%|"The {{tag|img}} tags ..."}} | To render [[HTML element]]s ("tags") in prose
| {{tlxb|code}} | {{nowrap|{{resize|95%|"Ensure the {{code|1=alt=}} parameter ..."}}}} | To indicate text is source code. To nest other templates within {{braces|code}}, use {{tag|code}}
| {{tlxs|codenowiki}} | {{longitem|style=font-size:95%;font-family:monospace; |<code><nowiki> {{var|code}} ...<br />... </nowiki></code>}} | To wrap example code in {{tag|code|o}} and nested {{tag|nowiki|o}} tags
| {{tlxb|syntaxhighlight}} | <sub>[this is a block template]</sub> | ({{thinsp|or {{tlx|sxhl}}}}) Wrapper for {{tag|syntaxhighlight}}, but will wrap overflowing text
| {{tlxb|deprecated code}} | "Do not use {{tag|{{deprecated code|blink}}|o}}." | ({{thinsp|or {{tlx|dc}}}}) To indicate [[Deprecation|deprecated]] source code in template documentation, articles on HTML specs, etc. The {{tlx|dc2}} variant uses {{nowrap|strike-through}} ({{tag|{{dc2|blink}}|o}}) while {{tlx|dcr}} uses red ({{tag|{{dcr|blink}}|o}}).
| {{tlxb|pre}} | <sub>[this is a block template]</sub> | For larger blocks of source code and other pre-formatted text
| {{tlxb|quote}} | <sub>[this is a block template]</sub> | For block quotations (only – never for non-quotations)
| {{tlxb|block indent}} | <sub>[this is a block template]</sub> | For indented blocks of material; visually identical to {{tlx|quote}} but without quote markup
| {{tlxb|kbd}} | {{kbd|user input}} | To indicate user input
| {{tlxb|key press}} | {{key press|Ctrl|x}} | To indicate specific-keystroke input, including combinations
| {{tlxb|key top}} | {{key top|Left shift}} | Similar; includes more symbols, but does not directly support combinations
| {{tlxb|PlayStation key press}} | {{lower|0.17em|{{PlayStation key press|square}}}} | To indicate PlayStation-style gamepad key presses<span style{{=}}"display: inline-block; padding-top: 0.3em; padding-bottom: 0.1em;"> </span>
| {{tlxb|button}} | {{button|Don't save}} | To indicate a button in a user interface
| {{tlxb|samp}} | {{samp|example output}} | To indicate sample or example output
}}
}}<noinclude>{{Documentation}}</noinclude>