Talk:Xjansk
Jump to navigation
Jump to search
Question
Can someone teach me how to write pieces of code on a wiki? --(this comment by DanielE at 14:10, 18 February 2022 UTC; please sign your comments with ~~~~)
- If you mean code samples in a box, such as many articles have, the simplest thing is probably to start each of the lines with one extra space. As in, if the wiki markup is:
foo bar
- ...it will render as a preformatted code box like this:
foo bar
- You can also use
<pre>...</pre>
blocks, which work slightly differently (no wiki markup is processed in them), which may or may not be what you want. Or just<code>...</code>
if you want to show a code example in-line with other text (like in this sentence). All this is a little tricky to demonstrate on the wiki itself, but see https://www.mediawiki.org/wiki/Help:Formatting for the general MediaWiki documentation on the markup. --fizzie (talk) 14:22, 18 February 2022 (UTC)
Hey, thanks User:Fizzie! I’m totally new here. DanielE (talk) 14:57, 18 February 2022 (UTC)