Template:Code

From Mystcraft
Revision as of 21:37, 3 September 2018 by Floydman (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


This template can be used to display blocks of code. It has an advantage over the <pre> tag in that it can include text formatting. Line breaks must be explicitly stated using the <br/> element. There is only one parameter, so use this simple setup to call the template on any page: {{code|text}}.

Example

If you were to type this code:

{{code|'''The first line is bold.'''<br/>''The second line is italicized.''<br/>The third '''''word''''' in the third line is bold and italicized.}}

You would get this result:

The first line is bold.
The second line is italicized.
The third word in the third line is bold and italicized.