Help:Wiki code

Wiki code, otherwise known as wiki markup, is a computer language used on MediaWiki sites such as WikiMac and the Wikipedia.

The wiki markup
In the left column of the table below, you can see what effects are possible. In the right column, you can see how those effects were achieved. In other words, to make text look like it looks in the left column, type it in the format you see in the right column.

You may want to keep this page open in a separate browser window for reference.

Sections, paragraphs, lists and lines
{| border="1" cellpadding="2" cellspacing="0" ! What it looks like ! What you type Start your sections as follows:
 * - valign="top"

New section 

Subsection 

Sub-subsection 


 * Start with a second-level heading ( == ); do not use first-level headings (=).
 * Do not skip levels (e.g., second-level followed by fourth-level).
 * A Table of Contents will automatically be added to an article that has four or more sections.

Sub-subsection
A single newline generally has no effect on the layout. These can be used to separate sentences within a paragraph. Some editors find that this aids editing and improves the function diff (used internally to compare different versions of a page).
 * - valign="top"

But an empty line starts a new paragraph.

A single newline generally has no effect on the layout. These can be used to separate sentences within a paragraph. Some editors find that this aids editing and improves the function diff (used internally to compare different versions of a page).
 * When used in a list, a newline does affect the layout (see below).

But an empty line starts a new paragraph. You can break lines without starting a new paragraph.
 * - valign="top"

You can break lines without starting a new paragraph. marks the end of a list item.
 * Please use this sparingly.
 * Close markup between lines, don't start a link or italics or bold on one line and close it on the next.
 * - id="lists" valign="top"
 * Lists are easy to do:
 * Start every line with a star.
 * More stars means deeper levels.
 * A newline in a list
 * A newline in a list

marks the end of a list item.
 * An empty line starts a new list.
 * Lists are easy to do:
 * Start every line with a star.
 * More stars means deeper levels.
 * A newline in a list


 * An empty line starts a new list.
 * - valign="top"
 * 1) Numbered lists are also good
 * 2) very organised
 * 3) easy to follow
 * 4) easier still
 * 1) easier still
 * 1) Numbered lists are also good
 * 2) very organised
 * 3) easy to follow
 * 4) easier still
 * - valign="top"
 * You can even do mixed lists
 * and nest them
 * like this
 * like this
 * You can even do mixed lists
 * and nest them
 * like this
 * - valign="top"
 * Definition list : list of definitions
 * item : the item's definition
 * another item
 * the other item's definition
 * the other item's definition


 * One item per line; a newline can appear before the colon, but using a space before the colon improves parsing.
 * Definition list : list of definitions
 * item : the item's definition
 * another item
 * the other item's definition


 * - valign="top"
 * A colon indents a line or paragraph.
 * A colon indents a line or paragraph.

A manual newline starts a new paragraph.


 * This is primarily for displayed material, but is also used for discussion on Talk pages.
 * A colon indents a line or paragraph.

A manual newline starts a new paragraph. IF a line starts with a space THEN it will be formatted exactly as typed; in a fixed-width font; lines won't wrap; ENDIF
 * - valign=top

IF a line starts with a space THEN it will be formatted exactly as typed; in a fixed-width font; lines won't wrap; ENDIF Centered text.
 * This is useful for:
 * pasting preformatted text;
 * algorithm descriptions;
 * program source code;
 * ASCII art;
 * chemical structures;
 * WARNING: If you make it wide, you force the whole page to be wide and hence less readable, especially for people who use lower resolutions. Never start ordinary lines with spaces.
 * - valign="top"

Centered text. A horizontal dividing line: this is above it
 * Note the American spelling of "center" (not "centre").
 * - valign="top"

and this is below it.

A horizontal dividing line: this is above it
 * Mainly useful for separating threads on Talk pages.
 * Also used to disambiguate within an article without creating a separate page.

and this is below it.
 * }

Placement of the Table of Contents (TOC)
At the current status of the wiki markup language, having at least four headers on a page triggers the TOC to appear in front of the first header (or after introductory sections). Putting anywhere forces the TOC to appear at that point (instead of just before the first header). Putting anywhere forces the TOC to disappear. See also compact TOC for alphabet and year headings.

Keeping headings out of the Table of Contents
If you want some subheadings to not appear in the Table of Contents, then make the following replacements.

Replace == Header 2 == with Header 2

Replace === Header 3 === with Header 3

And so forth.

For example, notice that the following header has the same font as the other subheaders to this "Tables" section, but the following header does not appear in the Table of Contents for this page.