Vikidia currently has 2,871 articles. Improve it!

Join Vikidia: create your account now and improve it!

Help:Wiki syntax

From Vikidia, the encyclopedia for 8 to 13-year-old children that everybody can make better
Jump to: navigation, search

Vikidia is based on the MediaWiki software which allows editing pages using a specific syntax sometimes referred to as "wikitext". As usual in computing, the software is powerful yet "stupid": it won't understand our intentions, only execute our orders. Therefore, we humans need to conform to the rules understood by MediaWiki for it to render the pages as we want.

On this help page, we shall have an initial look at the MediaWiki wikitext syntax, focusing on what you will need to start contributing on Vikidia.

Another mean to learn is to look at the wikitext code of an existing page: just go the "Edit source" tab, as if you would want to modify the page, and examine the code. Copy interesting parts of it and paste them for instance on the Vikidia:Sandbox page to start experimenting with this code by yourself.

Basics[edit source]

Don't start a line with a white space[edit source]

The first character on a new line may tell MediaWiki to render that paragraph in a certain special way. A white space as first character would generate...

...this result.

New line[edit source]

  • To start a new paragraph, insert a blank line. Just starting a new line won't have any visible effect.
  • Use <br/> to start a new line within the same paragraph. This should however not be used very often.

Bold and italics[edit source]

To set some text in bold or italics, use single quote characters ( ' ) as follows:

  • italics = 2 single quotes both left and right of some text
    This code: ''some text'' ...results in: some text
  • bold = 3 single quotes both left and right of some text
    This code: '''some text''' ...results in: some text
  • bold and italics = 5 single quotes both left and right of some text!
    This code: '''''some text''''' ...results in: some text

Headings[edit source]

Several levels of headings[edit source]

Start a line with some "equal" signs (=) and place the same number of equal signs at the end of that line: the line is then interpreted as a heading.

The number of equal signs denotes the heading level. Always use 2 or more equal signs, as the first level is conventionally reserved for the page title.

For instance, the headings of this section are coded as follows:

== Headings ==
=== Headings on several levels ===

Sections[edit source]

A section corresponds to a part of a page starting with a certain heading line down to the last line before the next heading of the same level.

When editing an article, you can edit a section instead of the whole article by clicking on the [edit] link near that section heading.

We use to write a short introduction to the article as a very first section, even before the first heading.

Table of contents[edit source]

A table of content is added automatically on any page containing at least 3 headings. By default, it is displayed just before the first heading, i.e. after the introduction.

To force the display of a table of content at a certain location on the page, enter __TOC__ where it should be displayed. The code __NOTOC__ can be used to avoid displaying the table of content. These tricks may prove useful on non-article pages, such as portals.

Links[edit source]

Links to Vikidia pages[edit source]

A link to another page (an article, a help page, a portal...) is coded using double pairs of square brackets.

  • Basic link:
    [[target page title]]
    For instance, the code [[London]] is the capital city of the [[United Kingdom of Great Britain and Northern Ireland]]. results in: London is the capital city of the United Kingdom of Great Britain and Northern Ireland.
  • To display linked words that do not correspond exactly to the target page title, add the words to be displayed in the link, separated from the target page title with a vertical bar:
    [[target page title|displayed words]]
    For instance, the code [[London]] is the capital city of the [[United Kingdom of Great Britain and Northern Ireland|UK]]. results in: London is the capital city of the UK.
  • To insert a link pointing to a category or an image, their name must be preceded with a colon:
    For instance, the code [[:Category:Africa|Articles about Africa]] results in: Articles about Africa
    Similarly, the code [[:File:Africa satellite orthographic.jpg|A satellite image of Africa]] results in: A satellite image of Africa

Links to external sites[edit source]

A link pointing towards an external site is surrounded with just one pair of square brackets.

  • Everything up to the first white space corresponds to the target location of the link (a URL usually starting with http://), everything else constitutes the displayed words of the link:
    The code [http://www.esa.int/esaKIDSen/ ESA Kids] results in ESA Kids

Lists (bullets or numbers)[edit source]

Bullets Numbers
Start lines with asterisks * to create bullet-ed lists. This code:
* The first main item
** A sub-item
** A second sub-item
*** A third-level sub-item
* The second main item

...produces this result:

  • The first main item
    • A sub-item
    • A second sub-item
      • A third-level sub-item
  • The second main item
Start lines with hashes # to create numbered lists. This code:
# The first main item
## A sub-item
## A second sub-item
### A third-level sub-item
# The second main item

...produces this result:

  1. The first main item
    1. A sub-item
    2. A second sub-item
      1. A third-level sub-item
  2. The second main item
Mixing bullets and numbers
You can also combine bullet-ed and numbered lists. This code:
# First numbered item
#* First sub-item
#* Second sub-item
# Second numbered item

...produces this result:

  1. First numbered item
    • First sub-item
    • Second sub-item
  2. Second numbered item

Using templates[edit source]

The content of any wiki page can be inserted (or "transcluded") into any other page by enclosing its name in a double pair of curly braces. This is useful when a certain text should be inserted on many pages, when some information should be formatted always in the same way, etc.

"Templates" are pages created with this specific usage in mind. Their rendering may depend on the values of parameters, specified after the template page name inside the curly braces and separated from each others with vertical bars.

For instance, the template with page name "Template:Info" can be used to display a tooltip providing explanation on a difficult word, an abbreviation etc. Only the part of the page name after "Template:" must be specified when inserting the template. This specific template requires 2 parameters: the first one is the normal text (i.e. the difficult word or abbreviation), the second one is the explanation. So, this code:

This is a {{Info|difficult word|Some text to explain that word.}}.

...produces this result:

This is a difficult word.

Many templates exist with various purposes. You'll discover them by looking into the code of articles or browsing the Category:Templates. Go on the template page itself to get some documentation about the template, how to use it and its parameters.

On talk pages[edit source]

Indent[edit source]

On talk pages, where Vikidians discuss on how to improve specific articles and Vikidia in general, responses are indented by means of colons used at the beginning of the lines to make reading the discussions easier. This code:

I propose that... What do you think?
: Good idea!
:: OK, let's give it a try.

...produces this result:

I propose that... What do you think?

Good idea!
OK, let's give it a try.

Signature[edit source]

Don't forget to sign on talk pages, by ending your comments with 4 tildes: ~~~~

Sources[edit source]