Template:Tt/doc
Usage[edit source]
{{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 {{#vardefine:tag|tt}}{{#vardefine:tag_content| }}<{{#var:tag}}>{{#var:tag_content|...}}</{{#var:tag}}>
, 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 {{#vardefine:tag|span}}{{#vardefine:tag_content| }}<{{#var:tag}}>{{#var:tag_content|...}}</{{#var:tag}}>
, which is an inline element.
{{#vardefine:tag|code}}{{#vardefine:tag_content| }}<{{#var:tag}}>{{#var:tag_content|...}}</{{#var:tag}}>
is normally used to indicate source code and {{#vardefine:tag|var}}{{#vardefine:tag_content| }}<{{#var:tag}}>{{#var:tag_content|...}}</{{#var:tag}}>
for variables or variable input.
{{#vardefine:tag|kbd}}{{#vardefine:tag_content| }}<{{#var:tag}}>{{#var:tag_content|...}}</{{#var:tag}}>
and {{#vardefine:tag|samp}}{{#vardefine:tag_content| }}<{{#var:tag}}>{{#var:tag_content|...}}</{{#var:tag}}>
display similarly to {{#vardefine:tag|tt}}{{#vardefine:tag_content| }}<{{#var:tag}}>{{#var:tag_content}}
, and are normally used for keyboard and samples.
For example:
- {{tt|123<br/>ABC}}
produces
- 123
ABC
rather than
- 123
ABC
Parameter[edit source]
- {{{1}}} or unnamed
- The content to format as monospaced. If the content contains a
=
character,
must be used instead.{{=}}
Note: Copied from wikipedia:Template:Mono, renamed to 'tt' because it replaces the tt tag.
"monospace, monospace" needed per wikipedia:Wikipedia:Typography#The_monospace_'bug'