Template:Semantic markup templates: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Grolltech
add missing examples for clarity
Ookami (talk | contribs)
m 60 revisions imported
 
(43 intermediate revisions by 14 users not shown)
Line 1: Line 1:
<!--This is transcluded into all these templates' /doc pages to save time.-->
{{Navbox
<div style="float:right; padding:0 1em;">{{navbar|Semantic templates see also|plain=y}}</div>
| name = Semantic markup templates
* {{tl|strong}} &ndash; for semantically indicating {{strong|strong emphasis}} instead of simple typographical boldfacing
| state = {{{state|{{{1|<includeonly>collapsed</includeonly>}}}}}}
* {{tl|strongbad}} &ndash; same as {{tnull|strong}} but red like this: {{strongbad|Never}} use {{tnull|strongbad}} in articles.
| title = {{c|Semantic markup templates}}
* {{tl|stronggood}} &ndash; same as {{tnull|strongbad}} but green like this: {{stronggood|Only}} use {{tnull|stronggood}} on non-article pages.
| liststyle = font-size:110%;
* {{tl|em}} &ndash; similar template for semantically indicating {{em|mild emphasis}} instead of simple typographical italicization
| tracking = no <!-- keep the documented templates out of the hlist tracking category -->
* {{tl|var}} &ndash; same as {{tl|varserif}} use for all variables (e.g. {{var|strIllustratePrefix}}), except for 'I' (upper-case i) and 'l' (lower-case L), for which use {{tl|varserif}}
 
* {{tl|varserif}} &ndash; same as {{tl|var}} but uses serif font (e.g. {{varserif|strIllustratePrefix}}), especially for distinguishing between 'I' (upper-case i) and 'l' (lower-case L) as variables
| list1 =
* {{tl|wikivar}} &ndash; for displaying wikicode variables and magicwords as they would appear in source code, e.g. {{wikivar|PAGENAME}}, {{wikivar|DEFAULTSORT|Lastname, Firstname}}
  {{Aligned table
* {{tl|para}} &ndash; for displaying wiki template parameters ({{para|title}}) or parameters and values ({{para|year|2008}})
  |cols=3 |class=sortable |style=line-height:1.35em;text-align:left;
* {{tl|tlx}} and related &ndash; for displaying entire templates (with or without parameters and values) as code
  |colstyle=<!--vertical-align:middle;-->padding-right:1.0em;
* {{tl|tag}} – for using HTML elements ("tags") in prose (e.g. "When coding HTML {{tag|img}} tags, be sure to use the {{code|1=alt=}} parameter...")
  |col2style=white-space:nowrap; |col3style=white-space:normal;
* {{tl|code}} &ndash; for computer source code ({{tnull|var}} and other templates cannot be used inside it; in that case use {{tag|code}} as the wrapper, not {{tnull|code}})
  |row1style=line-height:1.6em;
* {{tl|syntaxhighlight}} or {{tl|sxhl}} – wrapper for {{tag|syntaxhighlight}}, but will wrap overflowing text
  |row1header=on
* {{tl|deprecated code}} or {{tl|dc}} &ndash; for deprecated source code in template documentation, articles on HTML specs, etc.
  | Template&nbsp;      | Example output&nbsp;                                | Use&nbsp;
* {{tl|pre}} – for larger blocks of source code and other pre-formatted text
 
* {{tl|bq}} &ndash; for indented blocks of content, such as block quotations, examples, poems, etc.
  | {{tlxb|strong}}     | {{strong|Important!}}                               | To indicate [[HTML element#strong|<nowiki><strong></nowiki>]] importance, seriousness, or urgency instead of just simple typographical boldfacing
* {{tl|kbd}} &ndash; for indicating {{kbd|user input}}
  | {{tlxb|strongbad}} | "{{strongbad|Never}} use&thinsp;..."                | Same as {{braces|strong}} but in red
* {{tl|key press}} &ndash; for indicating the input of specific keystrokes, e.g. {{key press|Ctrl}}{{key press|X}}
  | {{tlxb|stronggood}} | "{{stronggood|Only}} use&thinsp;..."                | Same as {{braces|strong}} but in green
* {{tl|PlayStation key press}} &ndash; for indicating PS-style gamepad key presses, e.g. {{pskeypress|x}}
  | {{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)
* {{tl|samp}} &ndash; for {{samp|example output}}<!--
  | {{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
--><noinclude>
  | {{tlxb|var serif}}   | {{var serif|strIllustratePrefix}}                     | (see {{braces|var}} above)
<!-- ADD CATEGORIES AND INTERWIKIS TO THE /doc PAGE, NOT HERE, THANKS -->
  | {{tlxb|tld}}        | {{tld|DEFAULTSORT:Y, X}}                             | To display wikicode variables and [[Help:Magic words|magic words]] as they would appear in code
{{documentation}}
  | {{tlxb|para}}       | {{para|year|2008}}                                   | To display template parameters with or without values
</noinclude>
  | {{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&thinsp;..."}}    | To render [[HTML element]]s ("tags") in prose
  | {{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}}
  | {{tlxs|codenowiki}} | <code><nowiki>{{small|small text}}</nowiki></code>  | To wrap example code in {{code|<code><<nowiki>nowiki</nowiki>>...<<nowiki>/nowiki</nowiki>></code>}}
  | {{tlxs|kbdnowiki}} | <kbd><nowiki>{{big|big text}}</nowiki></kbd>        | To wrap example code in {{code|<kbd><<nowiki>nowiki</nowiki>>...<<nowiki>/nowiki</nowiki>></kbd>}}
 
  | {{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
  | {{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}}).
  | {{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)
  | {{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
  | {{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;">&nbsp;</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>

Latest revision as of 00:59, 3 September 2020