Help:Wikitext

Wikitext, also known as wiki markup, refers to the syntax, keywords, and punctuation marks used by to format a page. For example, to make text italicized, you would type  into the page when editing it. You will see wikitext if you click on '' to edit a page. If you use the new VisualEditor to edit a page, you will not see wikitext when editing, and will instead edit the page like you would a Word document.

This page is a comprehensive guide to the many different features, syntaxes, and keywords offered by wikitext. For a simplified view containing only the essentials you need to know to start editing, check out the cheatsheet.

Section headings
Section headings are used to divide the page up into different sections. Section headings are created by starting a new line and then surrounding the text you want to use as a heading with equal signs. The number of equal signs used indicates the heading level to use. For instance, two equal signs on both sides of the text produces a Level 2 heading, while three equal signs produces a Level 3 heading.

Level 1 headings should not be used in articles, as the Level 1 heading is used in the article title. {| style="width:100%;" !scope="col" style="width:50%;"| You type !scope="col" style="width:50%;"| You get
 * style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"| = Heading 1 =
 * style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"| = Heading 1 =

Heading 6

 * style="width:50%; background:#f9f9f9; border-width:1px;border-style:solid none none solid;border-color:#ddd; padding:9px 5px 5px; vertical-align:top;"|


 * style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
 * style="width:50%; border-width:1px;border-style:solid none none none;border-color:#ddd; padding:5px; vertical-align:top;"|
 * }
 * }

Horizontal rule
The horizontal rule, also known as a horizontal line, creates a paragraph-level thematic break. This shouldn't be used in article content, as section headings will create these rules automatically.

Table of contents
When four or more headings are used on a page, a table of contents will automatically appear. You can control the table of contents using magic words placed anywhere on the page.


 * forces the table of contents to always appear, regardless of the number of headings.
 * forces the table of contents to appear where the magic word was placed, rather than at the normal location.
 * disables the table of contents, even if the page has more than four headings.

Line breaks
Single line breaks are not shown in the rendered text. As such, to start a new paragraph, you must use two line breaks instead of just one, leaving an empty line between the two paragraphs. A single line break can be used to split up very long sections of content in the wikitext without affecting the rendered output. Keep in mind that single line breaks will still terminate some markup, like bold and italics.

You can use  to create a single line break.

Lists
Lists can be used as a way of organizing content. Each entry of the list should be preceded by a  (for bulleted lists) or   (for numbered lists), and each entry should be separated by one line break. A line that doesn't start with a  or   is not considered to be part of the list.

Bulleted lists
Bulleted, or unordered lists, are marked with a standard "bullet" character.

Numbered lists
Numbered, or ordered lists, are numbered on the side. Numberings will continue past sub-items, but a line that doesn't start with a  is not considered part of the list, and the numbering will be reset on the next list.

Description lists
Terms and definitions can be easily listed by first starting a line with a semicolon (;), specifying the term, then starting a new line with a colon (:) before specifying the definition(s). This format can be used for other purposes too, such as listing the make and models of vehicles.

Do not use a semicolon to simply bold a line without also specifying a value with a colon. This renders invalid HTML and can cause issues with screen readers. To bold a line, consider using a section heading instead, or bold the text the normal way.

Indent text
Indentation is usually not used in articles, but is commonly used on talk pages to separate other people's comments. Indentation follows similar rules to lists; each line needs to start with a colon, and multiple colons can be used to deepen the indentation level. Each colon indents the line by three character positions.

Poem
You can use the  tags to preserve both single line breaks and spaces at the beginning of lines. This is good for poems, lyrics, mottoes, oaths, and the like, where one may wish to retain line breaks and spaces.

Poems and their translations can be viewed side by side, and the language can be defined with. The poem tag also accepts some CSS styling elements. When you are done, you must use in order to cancel the   attribute and re-establish normal text flow.

Frère Jacques, frère Jacques, Dormez-vous? Dormez-vous? Sonnez les matines! Sonnez les matines! Ding, dang, dong. Ding, dang, dong. Are you sleeping? Are you sleeping? Brother John, Brother John, Morning bells are ringing! Morning bells are ringing! Ding, dang, dong. Ding, dang, dong.

Blockquote
To separate a block of text from the rest of the article, use the  tag. This is useful for inserting blocks of cited or quoted text. The blockquote tag will indent both margins as needed, rather than only the left margin as using colons does.

Internal links
Internal links link to articles on. You can create a link by putting double square brackets around the text you want to link. For example,  would create a link to The Sims 2. You can optionally use a vertical bar (|) in the link to change the displayed text. For example,  would produce The second game in the series, which links to The Sims 2 but displays the text "The second game in the series".

If you link to a page that doesn't exist yet, it will turn red, like this. If you click on a red link, you'll be taken to a page where you can create that page. If you link to the current page, it will be shown as bold text instead.

You can also link to a section of a page by adding a hash symbol (#) and then specifying the name of the section you want to link to after it. For example,  would link to the Tutorial section of The Sims 2,

Blend links
You can have the text immediately after a link "blend" into the link without having to use the vertical bar character above. This can make it easier to link some of the most commonly used words, like words that end in "s". Trailing apostrophes (and anything after said apostrophe) are not blended.

If you need to suppress blending, you can use a single  tag to disable it.

Pipe trick
The "pipe trick" is a quick and easy way to create a renamed link without going through the hassle of specifying another page name. To do this, simply add the vertical bar (|) character immediately after the link, within the square brackets. This will automatically create a link to the specified page without text in parenthesis, namespace prefixes, commas and text following commas, and some other elements.

The changes made by the pipe trick are applied when you click the '' button and serves merely as an aid to editing. It doesn't work in edit summaries, footnotes, or section links.

Interlanguage links
Use the code  at the bottom of the page to link to a page on another language wiki on  (if the two are connected). These links do not appear in the article, but instead appear in the sidebar under the menu section "Languages".

 Plankton Plancton Plancton Планктон

Interwiki links
If set on Special:Interwiki, you can link to many other sites without having to use external link syntax by using an interwiki link. This involves writing the link like any other internal link, but beginning the link with the interwiki prefix for the site.

Linking to another Miraheze wiki
The syntax is. The link prefix is the part of the URL that precedes the  part in the URL. For example,  would be the link prefix for.

Linking to a Wikimedia wiki
Virtually all Wikimedia sites are listed in the interwiki table and can be linked to using interwiki links.

Categories
To add a category, simply add  to the article, preferably at the bottom of the page.

You can define a sort key for the category (which will affect how it's sorted on the category page) by writing the category link as a piped link.

To link to a category without adding it to the page, add a colon prefix to the link.

Redirects
You can redirect a page to another page by adding  to the very first line of the page, with nothing else on the same line. When the edit is saved, the page will automatically redirect users that visit it.

You can redirect to a section of a page by adding.


 * 1) REDIRECT Africa


 * 1) REDIRECT Africa

Musical notation
Use the syntax to add musical notes.

Files
You can add files, such as images and videos, to pages by using a similar syntax to regular links and categories. The file must have already been uploaded to the wiki first; you can check to see if it exists either by searching for it, or by going through the list of files. Files from the Wikimedia Commons may also be used on this wiki. To use the file, link to the full name of the file as it appears on the wiki or on Wikimedia Commons.

Templates
A template is a page containing text or other forms of wiki markup that are meant to be copied onto other pages automatically. The act of automatically displaying the contents of a page on another page is called "transclusion". Template pages begin with Template: (note the colon) in their page titles, and are added onto pages by adding the name of the template, surrounded by curly brackets. For example, to transclude the contents of Template:Foo bar onto a page, edit the page you want to add the template to and add  to the page.

Many templates contain parameters which lets you customize how the template appears on the page. Parameters are called by using a vertical bar (|). If the parameter is unnamed, then you can simply specify the values for the parameter after the vertical bar. Otherwise, if the parameters are named, you must first specify the name of the parameter after the vertical bar, followed by an equal sign (=), and then the values for the parameter. For example,

You can usually find a description of a template's parameters on a template's documentation page, which is usually found when viewing a template page directly. For example, to view the documentation on how to use Template:FontColor correctly, simply visit that template's page and then scroll to the bottom. The template's documentation is usually contained in a box titled "Template documentation" and contains instructions on how to use the template.

Escaping wikitext
In situations where you need to display the raw wiki markup codes on the page without rendering them, such as for demonstration purposes or when they conflict with a character you want to use on the page, you can "escape" them by using the following methods.

Nowiki tags
The  tags can be used to tell the wiki software not to convert wiki markup into HTML, instead displaying them in their raw form on the page. For example,  would be rendered as Bold text, rather than as Bold text like it normally would. Anything placed between these tags will not have their wiki markup processed, and new lines and multiple spaces will be stripped. It will still interpret HTML character codes.

You can also use a single  to "break" certain interpretations. For example, placing  before a list entry (either   or  ) will cause that entry to not be considered part of the list.

Preformatted text block
The  tag ignores wiki markup like the &lt;nowiki&gt; tag. It will also display the text in a monospace font, and does not reformat text and spaces. It will still interpret HTML character codes.

Preformatted text blocks do not wrap, so text may extend off-screen past the browser window. To resolve this, you can use CSS styling to add wrapping or a horizontal scrollbar.


 * Wrapping:
 * Scrollbar:

Hidden text (comments)
Hidden comments can be inserted into the text by surrounding them with. Any text entered between these tags will be visible when editing the page, but not when the page is rendered. For example:

Comments can be used to leave notes for other editors, or to explain what bits of code does when editing complex templates.