MediaWiki Sampler

This page provides some examples of Mediawiki markup that aren't found on About Wikis. That page does provide a comprehensive list of wiki markup tags, but doesn't attempt to provide all the possible combinations and examples.

Note: To see the wiki markup for these examples, choose Show Page as Text from the Wiki Controls menu on the left.

Inline Formatting

Text can be made bold or italics or both by using simple wiki markup.

You can also use XHTML elements for things like in-line code or subscripts or superscripts.

A note about XHTML markup characters: You can use characters like '<' and '>' freely in your text, without worrying about having to escape them. Only if what you type looks like an XHTML start tag or end tag will it be interpreted as such. There are two ways to escape start and end tags:

Image too wide for page

Source Code Formatting

Mediawiki enables simple formatting of code if you add a space before each line of code. However, something you can't do easily is show HTML markup as code. For that, it's easiest to use the <pre> tag. Also, you can get some nice formatting of multiple lines of source code by using the language name with the <pre> tag. For example,