Template:Semantic markup templates: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Sardanaphalus
m replaced thinsp
Ookami (talk | contribs)
m 60 revisions imported
 
(34 intermediate revisions by 11 users not shown)
Line 1: Line 1:
<!--
{{Navbox
  Transcluded by the /doc pages of the templates listed
| name = Semantic markup templates
--->
| state = {{{state|{{{1|<includeonly>collapsed</includeonly>}}}}}}
<div style="float:right;padding:0 1.0em;">{{navbar|Semantic templates see also|plain=y}}</div>
| title = {{c|Semantic markup templates}}
{| cellspacing="0" cellpadding="1"
| liststyle = font-size:110%;
|- style="font-size:115%;line-height:1.8em;"
| tracking = no <!-- keep the documented templates out of the hlist tracking category -->
|style="width:9.0em;"| '''Template''' ||style="width:19.5em;"| '''Example output''' || '''Use'''
 
|-
| list1 =
| {{tl|strong}}
  {{Aligned table
| {{strong|strong semantic emphasis}}
  |cols=3 |class=sortable |style=line-height:1.35em;text-align:left;
| To indicate [[HTML element#strong|<nowiki><strong></nowiki>]] emphasis instead of (or as well as) simple typographical boldfacing. </tr>
  |colstyle=<!--vertical-align:middle;-->padding-right:1.0em;
| {{tl|strongbad}}  || "{{strongbad|Never}} use..." || Same as {{braces|strong}} but in red. </tr>
  |col2style=white-space:nowrap; |col3style=white-space:normal;
| {{tl|stronggood}} || "{{stronggood|Only}} use..." || Same as {{braces|strong}} but in green. </tr>
  |row1style=line-height:1.6em;
|-
  |row1header=on
| {{tl|em}}
  | Template&nbsp;      | Example output&nbsp;                                | Use&nbsp;
| {{em|mild semantic emphasis}}
 
|style="line-height:1.3em;"| As per {{braces|strong}} but for the milder [[HTML element#em|<nowiki><em></nowiki>]] emphasis (instead of{{\}}as well as typographical italicization). </tr>
  | {{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&thinsp;..."                 | Same as {{braces|strong}} but in red
|style="vertical-align:top;"| {{tl|var}}
  | {{tlxb|stronggood}} | "{{stronggood|Only}} use&thinsp;..."                 | Same as {{braces|strong}} but in green
|style="vertical-align:top;"| {{var|strIllustratePrefix}}
  | {{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)
|style="vertical-align:top;line-height:1.3em;"| To indicate text is a variable name. Use for any variables except those whose names include "I" (uppercase&nbsp;i) and/or "l" (lowercase&nbsp;L), where {{braces|varserif}} below should be used instead to ensure a distinction between these letters is noticeable. </tr>
  | {{tlxb|var}}       | {{var|strPrefix}}                                   | To indicate text is a variable name. Use for any variable names except those including "I" (uppercase&nbsp;i) and/or "l" (lowercase&nbsp;L); for these, {{braces|var serif}} should be used to ensure a noticeable distinction
| {{tl|varserif}} || {{varserif|strIllustratePrefix}} || (see {{braces|var}} above). </tr>
  | {{tlxb|var serif}}   | {{var serif|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
| {{tl|wikivar}}
  | {{tlxb|para}}       | {{para|year|2008}}                                   | To display template parameters with or without values
|style="white-space:nowrap;"| {{wikivar|PAGENAME}}{{nbsp|2}}{{wikivar|DEFAULTSORT|Y, X}}
  | {{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
| To display wikicode variables and [[Help:Magic words|magic words]] as they would appear in code.
  | {{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&thinsp;..."}}    | To render [[HTML element]]s ("tags") in prose
| {{tl|para}}
  | {{tlxb|code}}/{{tlxb|codett}} | {{nowrap|{{resize|95%|"Ensure the {{code|1=alt=}} parameter&thinsp;..."}}}}  | To indicate text is source code. To nest other templates within {{braces|code}}, use {{tag|code}}. {{tl|codett}} differs only in styling: {{code|someMethod}} becomes  {{codett|someMethod}}
| {{para|title}}{{nbsp|2}}{{para|year|2008}}
  | {{tlxs|codenowiki}} | <code><nowiki>{{small|small text}}</nowiki></code>  | To wrap example code in {{code|<code><<nowiki>nowiki</nowiki>>...<<nowiki>/nowiki</nowiki>></code>}}
| To display template parameters with or without values.
  | {{tlxs|kbdnowiki}} | <kbd><nowiki>{{big|big text}}</nowiki></kbd>        | To wrap example code in {{code|<kbd><<nowiki>nowiki</nowiki>>...<<nowiki>/nowiki</nowiki>></kbd>}}
|-
 
| {{tl|param}}
  | {{tlxb|syntaxhighlight}}      | &nbsp; &nbsp; <sub>[this is a block template]</sub> | ({{thin space|or {{tlx|sxhl}}}})&nbsp; Wrapper for {{tag|syntaxhighlight}}, but will wrap overflowing text
| {{param|title}}{{nbsp|2}}{{param|title|alt}}{{nbsp|2}}etc.
  | {{tlxb|deprecated code}}       | "Do not use {{tag|{{deprecated code|blink}}|o}}."   | ({{thin space|or {{tlx|dc}}}})&nbsp; 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}}).
|style="line-height:1.3em;"| 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|pre}}                   | &nbsp; &nbsp; <sub>[this is a block template]</sub> | For larger blocks of source code and other pre-formatted text
|-
  | {{tlxb|quote}}                | &nbsp; &nbsp; <sub>[this is a block template]</sub> | For block quotations (only – never for non-quotations)
| {{tl|tlx}} etc.
  | {{tlxb|block indent}}         | &nbsp; &nbsp; <sub>[this is a block template]</sub> | For indented blocks of material; visually identical to {{tlx|quote}} but without quote markup
| {{tlx|Template|''first parameter''|...}}
  | {{tlxb|kbd}}                   | {{kbd|user input}}                                 | To indicate user input
| To display a template call (with or without parameters and values) as code.
  | {{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
| {{tl|tag}}
  | {{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;">&nbsp;</span>
|style="white-space:nowrap;"| "With HTML {{tag|img}} tags..."
  | {{tlxb|button}}                | {{button|Don't save}}                              | To indicate a button in a user interface
| To render [[HTML element]]s ("tags") as prose.
  | {{tlxb|samp}}                 | {{samp|example output}}                             | To indicate sample or example output
|-
  }}
| {{tl|code}}
 
| "Always include the {{code|1=alt=}} parameter..."
}}<noinclude>{{Documentation}}</noinclude>
|style="line-height:1.3em;"| To indicate text is source code. To nest other templates within {{braces|code}}, use {{tag|code}}.
|-
| {{tl|syntaxhighlight}} || ||style="line-height:1.3em;"| ''({{thinsp}}or {{tl|sxhl}}{{thinsp}})''&nbsp; Wrapper for {{tag|syntaxhighlight}}, but will wrap overflowing text.
|-
| {{tl|deprecated code}}
|style="white-space:nowrap;"| "Do not use {{dc2|{{tag|blink}}}}..."
|style="line-height:1.3em;" | ''({{thinsp}}or {{tl|dc2}}{{thinsp}})''&nbsp; To indicate [[Deprecation|deprecated]] source code in template documentation, articles on HTML specs, etc.
|-
| {{tl|pre}} ||  || For larger blocks of source code and other pre-formatted text. </tr>
| {{tl|bq}}   ||  || For indented blocks of content, such as block quotations, examples, poems, etc. </tr>
| {{tl|kbd}} || {{kbd|user input}} || To indicate user input. </tr>
| {{tl|key press}} || {{key press|Ctrl}}{{key press|X}} || To indicate specific keystroke/s input. </tr>
| {{tl|pskeypress}} || {{lower|0.2em|{{pskeypress|x}}}} || To indicate PlayStation-style gamepad key presses. </tr>
| {{tl|samp}} || {{samp|example output}} || To indicate sample or example output. </tr>
|-
|}<noinclude>{{Documentation}}</noinclude>

Latest revision as of 00:59, 3 September 2020