Template:Mono/doc

Template:Tcpl produces: .mw-parser-output .monospaced{font-family:monospace,monospace}Here is some text.

Template:Mono/doc
{{mono|text}}
{{mono|font-size|text}}

Template:Tcpl produces: Here is some text.

This template is for formatting short bits of content as monospaced (i.e. non-proportionally spaced) text. It is simply a quick shorthand for the necessary CSS code and a replacement for <tt>...</tt>, a sloppy old-school HTML way of achieving the same effect. (While the <tt> element does not yet appear among those marked as "Deprecated" in the W3C's "Index of the HTML 4 Elements", most other elements that have only a stylistic font effect and no semantic meaning have been so deprecated since 1998 in favor of CSS styling (and the few that have not have been generally deprecated by the Web development community anyway). Use of this template better separates content and presentation in Wikipedia articles.

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 should not be used to indicate source code, nor for variables or variable input (use <code>...</code> and <var>...</var>, respectively).

It can be used to mark up content that would otherwise have been marked up with <kbd>...</kbd> or <samp>...</samp> (definitions) – elements not supported by the MediaWiki software – but <code>...</code> may be more appropriate, depending upon the content and context.

It cannot be used to mark up multiple paragraphs, sections or other block elements, as it uses <span>, which is an inline element. See {{Monoblock}} for a <div>-based block version. Or, multiple instances of {{mono}} can be invoked.

To specify a font-size for the monospaced text, add it as the first parameter (followed by the text as the second):

{{mono|1.0em|This text is monospaced at 1.0em.}} produces: This text is monospaced at 1.0em.
{{mono|115%|This text is monospaced at 115% font-size.}} produces: This text is monospaced at 115% font-size.
..and so on.


Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.