Template:Semantic markup templates: Difference between revisions
Appearance
m 1 revision imported |
m 1 revision imported |
||
| (One intermediate revision by one other user not shown) | |||
| Line 20: | Line 20: | ||
| {{tlb|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) | | {{tlb|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) | ||
| {{tlb|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|var serif}} should be used to ensure a noticeable distinction | | {{tlb|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|var serif}} should be used to ensure a noticeable distinction | ||
| {{tlb|var serif}} | | {{tlb|var serif}} | {{var serif|strIllustratePrefix}} | (see {{braces|var}} above) | ||
| {{tlb|tld}} | | {{tlb|mvar}} | Let {{mvar|x}} be the maximum value used. | Used to refer to individual variables in <math> ([[MOS:FORMULA|formula]]) elements in normal running text. | ||
| {{tlb|dfn}} | This {{dfn|term|Definition}} has a definition | To indicate a [[MOS:TERM|term]] defined in nearby text. | |||
| {{tlb|dfni}} | This {{dfni|term}} has a definition | Wrapper for {{tl|dfn}} that applies metadata and italic styling. | |||
| {{tlb|lang}} | She said: "{{lang|fr|Je suis française.}}" | Indicate that a piece of text belongs to a particular language other than that of the page as a whole. | |||
| {{tlb|tlc}}/{{tlb|tld}} | {{tld|DEFAULTSORT:Y, X}} | To display wikicode variables and [[Help:Magic words|magic words]] as they would appear in code | |||
| {{tlb|parameter}} | {{para|year|2008}} | To display template parameters with or without values | | {{tlb|parameter}} | {{para|year|2008}} | To display template parameters with or without values | ||
| {{tlb|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|parameter}} above | | {{tlb|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|parameter}} above | ||
| Line 27: | Line 31: | ||
| {{tlb|tlx}} etc. | {{tlx|Template|{{var|1}}|{{var|2}}|...|{{var|10}}}} | To display a template call (with or without parameters and values) as code | | {{tlb|tlx}} etc. | {{tlx|Template|{{var|1}}|{{var|2}}|...|{{var|10}}}} | To display a template call (with or without parameters and values) as code | ||
| {{tlb|tag}} | {{resize|95%|"The {{tag|img}} tags ..."}} | To render [[HTML element]]s ("tags") in prose | | {{tlb|tag}} | {{resize|95%|"The {{tag|img}} tags ..."}} | To render [[HTML element]]s ("tags") in prose | ||
| {{tlb|code}}/{{tlb|codett}} | | {{tlb|code}}/{{tlb|codett}} | "Ensure the {{code|1=alt=}} parameter ..." | 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}} | ||
| {{tlb|PreCode}} | {{resize|95%|"[[Forth (programming language)|FORTH]] has keyword {{PreCode|?BRANCH}}."}} | Like {{tlb|code}}, but prevents line breaks inside the code. Only for very short code parts. | | {{tlb|PreCode}} | {{resize|95%|"[[Forth (programming language)|FORTH]] has keyword {{PreCode|?BRANCH}}."}} | Like {{tlb|code}}, but prevents line breaks inside the code. Only for very short code parts. | ||
| {{tlg|bold=y|subst=y|codenowiki}} | <code><nowiki>{{small|small text example}}</nowiki></code> | To wrap example code in {{code|<code><<nowiki>nowiki</nowiki>>...<<nowiki>/nowiki</nowiki>></code>}} | | {{tlg|bold=y|subst=y|codenowiki}} | <code><nowiki>{{small|small text example}}</nowiki></code> | To wrap example code in {{code|<code><<nowiki>nowiki</nowiki>>...<<nowiki>/nowiki</nowiki>></code>}} | ||
| {{tlg|bold=y|subst=y|kbdnowiki}} | <kbd><nowiki>{{large|large text example}}</nowiki></kbd> | To wrap example code in {{code|<kbd><<nowiki>nowiki</nowiki>>...<<nowiki>/nowiki</nowiki>></kbd>}} | | {{tlg|bold=y|subst=y|kbdnowiki}} | <kbd><nowiki>{{large|large text example}}</nowiki></kbd> | To wrap example code in {{code|<kbd><<nowiki>nowiki</nowiki>>...<<nowiki>/nowiki</nowiki>></kbd>}} | ||
| {{tlb|syntaxhighlight}} | {{syntaxhighlight|border=no|lang=html|line=1|highlight=2|code= | |||
| {{tlb|syntaxhighlight}} | | <table align=center style="background: ivory">}} | ({{thin space|or {{tlx|sxhl}}}}) Wrapper for {{tag|syntaxhighlight}}, but will wrap overflowing text | ||
| {{tlb|deprecated code}} | "Do not use {{tag|{{deprecated code|blink}}|o}}." | ({{thin space|or {{tlx|dc}}}}) To indicate [[ | | {{tlb|deprecated code}} | "Do not use {{tag|{{deprecated code|blink}}|o}}." | ({{thin space|or {{tlx|dc}}}}) To indicate [[deprecated]] source code in template documentation, articles on HTML specs, etc. The {{tlx|dc2}} variant uses strike-through ({{tag|{{dc2|blink}}|o}}) while {{tlx|dcr}} uses red ({{tag|{{dcr|blink}}|o}}). | ||
| {{tlb|pre}} | | | {{tlb|pre}} | {{pre|You miss '''100%''' of the shots you don't take}} | For larger blocks of source code and other pre-formatted text | ||
| {{tlb| | | {{tlb|blockquote}} | {{blockquote|No good deed<br />goes unpunished}}| For block quotations (only – never for non-quotations) | ||
| {{tlb|block indent}} | | | {{tlb|block indent}} | {{block indent|Hurry and succumb<br />to temptation before it<br />goes away}} | For indented blocks of material; visually identical to {{tlx|quote}} but without quote markup | ||
| {{tlb|kbd}} | {{kbd|user input}} | To indicate user input | | {{tlb|kbd}} | {{kbd|user input}} | To indicate user input | ||
| {{tlb|key press}} | {{key press|Ctrl|x}} | To indicate specific-keystroke input, including combinations | | {{tlb|key press}} | {{key press|Ctrl|x}} | To indicate specific-keystroke input, including combinations | ||