Template:Tt: Difference between revisions
imported>FrozenPlum m (3 revisions imported: Imported from help.fandom.com, Extension:DPL3 pages, which are for the obsolete version of DPL3 extension for MediaWiki 1.33, to adapt to forked (newer) extension version.) |
imported>FrozenPlum m (syncing things before making public again) |
||
Line 1: | Line 1: | ||
<span class="monospaced" style="font-family: monospace, monospace;">{{{1}}}</span>< |
<onlyinclude><includeonly><span class="monospaced" style="font-family: monospace, monospace;">{{{1}}}</span></includeonly></onlyinclude> |
||
{{ |
{{Documentation}} |
||
[[Category:Formatting templates]] |
|||
[[tr:Şablon:Tt]]<!-- |
|||
Copied from [[wikipedia:Template:Mono]], renamed to 'tt' because it replaces the tt tag |
|||
"monospace, monospace" needed per [[wikipedia:Wikipedia:Typography#The_monospace_'bug']] |
|||
wikipedia template at time of editing: |
|||
<templatestyles src="Mono/styles.css" /><span class="monospaced">{{{2|{{{1}}}}}}</span><noinclude> |
|||
--></noinclude> |
Revision as of 03:04, 29 March 2022
Usage
{{tt|text to format here}}
renders as:
text to format here
This template is for formatting short bits of content (the only parameter) as monospaced (nonproportional) text. It is simply a quick shorthand for the necessary CSS code. It is a replacement for <tt>...</tt>
, which is an obsolete element under HTML5. (Non-conforming features)
This template should be used where the content is being rendered in monospaced text for purely stylistic/display reasons, where this display has no particular semantic significance.
It cannot be used to mark up multiple paragraphs, sections or other block elements, as it uses <span>...</span>
, which is an inline element.
<code>...</code>
is normally used to indicate source code and <var>...</var>
for variables or variable input.
<kbd>...</kbd>
and <samp>...</samp>
display similarly to <tt>
, and are normally used for keyboard and samples.
For example:
- {{tt|123<br/>ABC}}
produces
- 123
ABC
rather than
- 123
ABC
Parameter
<templatedata> { "description": "This template is for formatting short bits of content as monospaced (nonproportional) text.", "format": "inline", "params": { "1": { "label": "Content", "description": "The content to format as monospaced.", "required": true, "type": "content" } } } </templatedata>
Note: Copied from wikipedia:Template:Mono, renamed to 'tt' because it replaces the tt tag.
"monospace, monospace" needed per WP:MONO