Template:Code
From Mystcraft
Revision as of 11:50, 3 September 2018 by Floydman (talk | contribs) (Created page with "<includeonly><div style="border: solid #AAAAAA 1px; background-color: #F8F9F9; padding: 16px>{{{1}}}</div></includeonly> <noinclude>This template can be used to display block...")
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.
The second line is italicized.
The third word in the third line is bold and italicized.