RuneScape Wiki
RuneScape Wiki

The wiki code style part of the style guide is a set of guidelines to work towards when cleaning up the wiki code used in articles. These guidelines are not an obligation during general editing, but serve as a common ground for the specific task of keeping the wiki code clean and consistent.


Trailing spaces

Do not allow trailing spaces at the end of lines or paragraphs. The only exception to this is a single trailing space following the '=' of a parameter without a value in a block-style template, so that a space is already present when the value is filled in later on.

Multiple spaces

Only a single space should be used between the end of one sentence and the beginning of the next, and between words.


There should be no spaces between text styling wiki syntax elements or HTML tags and their content. If the styling only surrounds a fraction of a full block, spaces should be on the outside of the styling. Use:

This is '''bold''' and <span style="color:red;">red</span>.

instead of:

This is '''bold '''and<span style="color:red;"> red</span>.

Line break tags

When <br /> tags are used, they should not be surrounded by spaces but immediately follow/precede the content that is broken into two lines. When used in a paragraph, the tag should be followed by an actual new line.



Inline templates should not have spaces between the pipe ('|') symbol and the parameter name (or value), nor before or after the '=' sign.



Block templates should have each parameter on a new line, with no space between the pipe symbol and the parameter name or value. The '=' symbol should be surrounded by a single space on each side. The final '}}' should be on a separate line.

{{Infobox Item


There should be a single space between a list character (* or #) and the content of that list item.

* List1
*# Sublist
* List2

Section headers

There should be no spaces between the '=' signs used as wiki syntax for the section headers and the content of the header.


Blank lines


Paragraphs should only be separated by a single blank line; if for some formatting reason a wider gap is required, use the {{Clear}} template as necessary. The clear template should be on its own line. Example:

Paragraph 1

Paragraph 2

If the formatting issue is caused by a right-floating element (such as an infobox), the clear template should generally have the value right; for left-floating elements (like chatheads), left.

A section header should always be preceded by a blank line, except if the previous line with content is another section header, or if the previous line is a {{Clear}} for formatting purposes and is preceded by a blank line. A section header should never be followed by a blank line. As with the detail and chathead images just after an infobox, if the first line after a section header is a (group of) file(s), or a simple text-template such as {{Main}}, it should not be followed by a blank line before the next paragraph.

There should be no blank line between a <references /> tag and its preceding table, if applicable; nor between the last trivia bullet.

Language links and categories should not be separated by blank lines. They should also follow the last content part of the article without any blank lines separating them, regardless of what that last bit of content is (text, list, table, template, ...).

Template grouping

There should be no blank line between the 'header templates', the infobox, and the first paragraph. 'Header templates' are the grouping of all templates that are generally put at the very top of an article (RSC/2007scape links, otheruses, strategy, dual wield, ...). There should be no blank lines between navboxes, nor between templates that belong together (such as drop table templates). Reflist tags should be separated by a blank line from following navboxes, even if they are not preceded by their own section header.


Lists should be followed by a blank line. On disambig pages the listing should always be preceded by a blank line.


Special tags

DISPLAYTITLE should be placed at the very top of the page, prior to any actual article content. At the bottom of the page DEFAULTSORT should be placed just prior to any language links (or categories). In both cases no blank lines should precede or follow these tags, and each tag should be placed on its own line. __NOTOC__ should be placed before the first section header, without a blank line in between them. All other behaviour switch magic words should be at the top of the page before DISPLAYTITLE; however, this should almost never occur.

Template order

The following order should be followed for 'header templates'. Each template should start on a new line:

<<Templates that redirect away from the current page: otheruses, redirect, dual wield, lucky variant, ...>>
<<Box templates that are about the current article: rare item, hasstrategy, holiday, ...>>
<<Remaining templates about the current article that generally are simple (italics) text: official world, ...>>


The detail image of an article should come first, after the infobox, followed by the chathead image (either only if applicable), and the first paragraph. Both of these should be left-floating elements.


In the mainspace, tables should always be created using the wiki syntax instead of using HTML tags. In other namespaces (specifically Template: and Module:) it might be required to use the HTML tags instead.

Except for very simple tables, multi-line row formatting should be preferred, where each cell starts on its own line.


Tables in mainspace articles should always have the class "wikitable", unless there is a specific reason why this is omitted. CSS classes for tables should be placed in the following order:
wikitable, sortable, lighttable, mw-collapsible, mw-collapsed/uncollapsed

If present, the table header should be the first thing following the table opening.

The order that should be used for any style and attributes applied to a table, cell or row is:
id, class, rowspan, colspan, style


A space should be placed between each table syntax element and table content, styling, and attributes. Empty cells should not contain anything, even a space, with the exception of an empty cell in the single-line row formatting as long as this is not the last cell of the row. In this case a single space should separate both cell boundary syntax elements.

Below are examples of the expected placement of white-spacing in both formats.

Single-line row

{| class="wikitable"
! Small table h1 !! h2
| Cell1 ||

Multi-line row

{| class="wikitable"
|+ Table header
! Header cell 1
! id="header2" colspan="2" | Header cell 2
| Content cell 1
| Content cell 2


Strict XHTML should be used in preference to older HTML. For example, prefer '<br />' to '<br>'. This also implies:

  • Surround all attribute values by double quotation marks: use '<references name="g" />' instead of '<references name=g />'
  • Separate attribute values by a space, but do not put a space around the '=' between attributes and their values: '<references name="g" group="d" />' instead of '<references name="g"group = "d" />'
  • Style attributes should contain no spaces surrounding the ':' between the style's tag and its value. Each style tag+value combination should be terminated by a ';', even if there is only a single pair, and a space should separate multiple tag+value combinations: '<span style="color:red; background:yellow;">' instead of '<span style="color : red;background: yellow">'
  • There should be no space between the last part of a tag and the closing '>', except in the case of a self-closing tag. For self-closing tags, a single space should precede the '/>'.

Prefer using CSS over deprecated HTML tags such as <u>...</u>, except when appropriate wiki syntax elements exist (such as '''BOLD'''). Notable exceptions are: the sup and sub tags.

Number formatting

Always include thousand separators in any numbers above 999 (and below -999), with the exception of in the year of a date (for both real dates and an ingame lore date) and for numbers that are template parameter values, which the template will automatically format (convert value of an Infobox Item, quantity of a DropsLine, ...).

Image captions

Non-thumbnail/framed images should generally not contain a caption. Use:

[[File:Fire rune detail.png|left]]

instead of:

[[File:Fire rune detail.png|left|A detailed image of a fire rune]]

Example page

Below are examples of the above guidelines in action, for a stub version of an average article.

Normal page

{{DISPLAYTITLE:Different title}}
{{Box template}}
{{Official world|PARAMETER=VALUE}}
{{Infobox name
'''Subject''' has information in lead paragraph.

==First heading==
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

{| class="wikitable sortable mw-collapsible mw-collapsed"
|+ Table header
! Header cell 1
! id="header2" colspan="2" style="text-align:right;" | Header cell 2
| Content cell 1
| Content cell 2

{| class="wikitable"
|+ Small table
! h1 !! h2
| Cell1 ||

==Second heading==
===Sub heading===
New line, same paragraph.

* Item
* Item

<references group="d" />

* Trivia


[[zxx:lang link]]

Disambiguation page

'''TERM''' may refer to:

* Item
* Item