Template:Markup

From Captain of Industry Wiki
Revision as of 10:31, 13 January 2022 by Thadius856 (talk | contribs) (Creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]

This template is used to present markup or code side by side with the output it renders.

Usage

Each pair of {{Markup}}'s arguments should be two copies of some wikitext markup, with the first of the pair enclosed in <nowiki> tags. The template produces output in two columns, the first showing the markup and the second showing how it is rendered. The template accepts up to 40 unnamed parameters, resulting in up to 20 rows of examples.

This:

{{markup|<nowiki>'''Bold text'''</nowiki>|'''Bold text'''}}

Produces this:

Markup Renders as
'''Bold text'''

Bold text

It is advisable to begin both copies of the markup with a newline; this is necessary if the first line of the markup must start on a new line (such as #, * or ;).

Examples

Multiple rows

Markup Renders as
'''Bold text'''

Bold text

''Italic text''

Italic text

[[Arc Furnace]]
  {{Recipe
    | Building    = Smoke Stack
    | Input1Name  = Oxygen
    | Input1Qty   = 200
    | Time        = 20
  }}
Smoke Stack.pngSmall
:
ACCEPTS
200
Oxygen.png
600
/ 20 Clock.png

/ 60 Clock 60s.png

With custom title and column headers

How to write about foxes and dogs in Wikipedia.
Write this in wikitext and this will appear in the article.
The quick brown [[fox]] jumps over the lazy [[dog]].

The quick brown fox jumps over the lazy dog.

With HTML entities

HTML entities are parsed in the markup cell. To work around this, replace the & with &amp; in the first column.

Markup Renders as
&ndash;


|
The above text is transcluded from Template:Markup/doc; you can change it or view its history. (How does this work?)
If you're done making changes, please refresh the text. (Why?)
You can experiment in this template's sandbox (create | mirror ) and testcases (create) pages.
Please add categories and interwikis to Template:Markup/doc. (View all subpages of this page.)