Template:Semantic markup templates: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Sardanaphalus Aligned table |
meta>SMcCandlish +Template:CoNo; clarification for Template:Deprecated code; fix poor example for Template:Var |
||
Line 24: | Line 24: | ||
| As per {{braces|strong}} but for the milder [[HTML element#em|<nowiki><em></nowiki>]] emphasis (instead of{{\}}as well as typographical italicization). | | As per {{braces|strong}} but for the milder [[HTML element#em|<nowiki><em></nowiki>]] emphasis (instead of{{\}}as well as typographical italicization). | ||
| {{tl|var}} | {{var| | | {{tl|var}} | {{var|strPrefix}} | ||
| To indicate text is a variable name. Use for any variables except those whose names include "I" (uppercase i) and/or "l" (lowercase L), where {{braces|varserif}} below should be used instead to ensure a distinction between these letters is noticeable. | | To indicate text is a variable name. Use for any variables except those whose names include "I" (uppercase i) and/or "l" (lowercase L), where {{braces|varserif}} below should be used instead to ensure a distinction between these letters is noticeable. | ||
Line 47: | Line 47: | ||
| {{tl|code}} | "Always include the {{code|1=alt=}} parameter..." | | {{tl|code}} | "Always include the {{code|1=alt=}} parameter..." | ||
| To indicate text is source code. To nest other templates within {{braces|code}}, use {{tag|code}}. | | To indicate text is source code. To nest other templates within {{braces|code}}, use {{tag|code}}. | ||
| {{tl|CoNo}} | <code><code><nowiki>{{var|your code}}</nowiki></code> | |||
| To wrap example code in {{tag|code||o}} and nested {{tag|nowiki|o}} markup. Usage: <code><nowiki>{{subst:CoNo|1=</nowiki>{{var|code example goes here}}<nowiki>}}</nowiki></code> | |||
| {{tl|syntaxhighlight}} | | | {{tl|syntaxhighlight}} | | ||
| ''({{thinsp|or {{tl|sxhl}}}})''{{nbsp|2}}Wrapper for {{tag|syntaxhighlight}}, but will wrap overflowing text. | | ''({{thinsp|or {{tl|sxhl}}}})''{{nbsp|2}}Wrapper for {{tag|syntaxhighlight}}, but will wrap overflowing text. | ||
| {{tl|deprecated code}} | "Do not use {{ | | {{tl|deprecated code}} | "Do not use {{deprecated code|<blink>}}." | ||
| ''({{thinsp|or {{tl| | | ''({{thinsp|or {{tl|dc}}}})'' To indicate [[Deprecation|deprecated]] source code in template documentation, articles on HTML specs, etc. The {{tl|dc2}} variant uses strike-through: {{dc2|<blink>}}, and {{tlx|dc|red{{=}}y}} uses red: {{dc|red=y|<blink>}}. | ||
| {{tl|pre}} | | | {{tl|pre}} | | ||
| For larger blocks of source code and other pre-formatted text. | | For larger blocks of source code and other pre-formatted text. |
Revision as of 00:07, 19 October 2014
Template | Example output | Use |
{{strong}} | strong semantic emphasis | To indicate <strong> emphasis instead of (or as well as) simple typographical boldfacing. |
{{strongbad}} | "Never use..." | Same as {{strong}} but in red. |
{{stronggood}} | "Only use..." | Same as {{strong}} but in green. |
{{em}} | mild semantic emphasis | As per {{strong}} but for the milder <em> emphasis (instead of / as well as typographical italicization). |
{{var}} | strPrefix | To indicate text is a variable name. Use for any variables except those whose names include "I" (uppercase i) and/or "l" (lowercase L), where {{varserif}} below should be used instead to ensure a distinction between these letters is noticeable. |
{{varserif}} | Template:Varserif | (see {{var}} above). |
{{wikivar}} | Template:WikivarTemplate:NbspTemplate:Wikivar | To display wikicode variables and magic words as they would appear in code. |
{{para}} | |title= Template:Nbsp|year=2008 | To display template parameters with or without values. |
{{param}} | {{{title}}} Template:Nbsp{{{title|alt}}} Template:Nbspetc. | To display parameters as used in code (i.e. with triple braces), especially to indicate relationships between them. May be combined with {{para}} above. |
{{tlx}} etc. | {{Template|first parameter|...}} | To display a template call (with or without parameters and values) as code. |
{{tag}} | "With HTML <img>...</img> tags..." | To render HTML elements ("tags") as prose. |
{{code}} | "Always include the alt= parameter..." | To indicate text is source code. To nest other templates within {{code}}, use <code>...</code> . |
{{CoNo}} | <code><nowiki>your code</nowiki></code> | To wrap example code in and nested <nowiki> markup. Usage: {{subst:CoNo|1=code example goes here}} |
{{syntaxhighlight}} | (Template:Thinsp)Template:NbspWrapper for <syntaxhighlight>...</syntaxhighlight> , but will wrap overflowing text. | |
{{deprecated code}} | "Do not use | (Template:Thinsp) To indicate deprecated source code in template documentation, articles on HTML specs, etc. The {{dc2}} variant uses strike-through: {{dc|red=y}} uses red: |
{{pre}} | For larger blocks of source code and other pre-formatted text. | |
{{bq}} | For indented blocks of content, such as block quotations, examples, poems, etc. | |
{{kbd}} | user input | To indicate user input. |
{{key press}} | CtrlX | To indicate specific keystroke/s input. |
{{pskeypress}} | Template:Pskeypress | To indicate PlayStation-style gamepad key presses. |
{{samp}} | example output | To indicate sample or example output. |