Wiki syntax


Wiki syntax (also known as Wiki markup, Wiki language, or Wiki text) is a markup language that you can use for quick content creation as a simple alternative to full HTML (HyperText Markup Language) code. There is no common Wiki syntax but each Wiki engine (the behind the scenes mechanism used to build and drive wiki sites) uses it's own similar but specific syntax.

You can browse through a detailed wiki syntax description below. This is a developing section which will see ongoing expansion and refinement.

1 Text and paragraph formatting

2 Links

3 Images

4 Tables

1 Text and paragraph formatting

1.1 Inline text style

If you type this… … you get this
//italic text// italic text
**bold text** bold text
//**italic and bold**// italic and bold
__underline text__ underline text
--strikethrough text-- strikethrough text
{{teletype (monospaced) text}} teletype (monospaced) text
normal^^superscript^^ normalsuperscript
normal,,subscript,, normalsubscript
[[span style="color:red"]]custom span element[[/span]] custom span element
##blue|predefined## or ##44FF88|custom-code## color predefined or custom-code color

1.11 Headings

To make some text into a heading simply start a line with a "plus symbol and a space"

+ Level 1 Heading

You can use multiples pluses to vary the heading level

++ Level 2 Heading
+++ Level 3 Heading
++++ Level 4 Heading
+++++ Level 5 Heading
++++++ Level 6 Heading

to give

Level 1 Heading

Level 2 Heading

Level 3 Heading

Level 4 Heading

Level 5 Heading
Level 6 Heading

1.2 Text size

Text (font) size can be set with the

[[size]][[/size]] tags.

These tags can be nested within each other.

1.21 Relative text sizes

Relative text sizes are based on the size of the prevailing font in use — they increase or decrease the current font size relative to that. To specify a relative text size use

[[size smaller]]
[[size larger]]

or for finder control use

[[size nem]]
[[size n%]]

where n is a 1 to 5 digit number (including an optional decimal point).

If you type this… …you get this
[[size smaller]]smaller text[[/size]] smaller text
[[size larger]]larger text[[/size]] larger text
[[size 80%]]80% of current size[[/size]] 80% of current size
[[size 100%]]100% of current size[[/size]] 100% of current size
[[size 150%]]150% of current size[[/size]] 150% of current size
[[size 0.8em]]80% of current size[[/size]] 80% of current size
[[size 1em]]100% of current size[[/size]] 100% of current size
[[size 1.5em]]150% of current size[[/size]] 150% of current size

1.22 Absolute text sizes

Absolute text sizes do not inherit characteristics of the prevailing font size, they replace them completely.. To specify an absolute text size use

[[size xx-small]]
[[size x-small]]
[[size small]]
[[size large]]
[[size x-large]]
[[size xx-large]]

or for finer control use

[[size npx]]

where n is a 1 to 5 digit number (including an optional decimal point).

If you type this… …you get this
[[size xx-small]]xx-small text [[/size]] xx-small text
[[size x-small]]x-small text [[/size]] x-small text
[[size small]]small text [[/size]] small text
[[size large]]large text [[/size]] large text
[[size x-large]]x-large text [[/size]] x-large text
[[size xx-large]]xx-large text [[/size]] xx-large text
[[size 7px]]text size 7 pixels [[/size]] text size 7 pixels
[[size 18.75px]]text size 18.75 pixels [[/size]] text size 18.75 pixels

1.3 Paragraphs

One new line produces a… new line. Two new lines produce a new paragraph.

Lorem ipsum dolor sit amet
Just a new line.
Another new line.

First paragraph. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

Second paragraph. Lorem ipsum dolor sit amet, consectetuer adipiscing elit

1.4 Punctuation symbols

If you do care about typography there are a few ways to improve it in your text:

If you type this … … you get this
``quotation'' “quotation”
`quotation' ‘quotation’
,,quotation'' „quotation”
@<quotation>@ «quotation»
>>quotation<< »quotation«
dots... dots…
em -- dash em — dash

1.5 Horizontal rules

To insert a horizontal tule simply use 4 dashes ----.

1.6 Bulleted lists

You can create bulleted lists by placing asterisks before each item to be in a list. To create bulleted lists with tiers, simply place an extra space before the asterisk to create an indent as shown below.

* Bullet 1
* Bullet 2
x* Bullet 2.1

gives

  • Bullet 1
  • Bullet 2
    • Bullet 2.1

1.7 Numbered lists

Similarly, you can create numbered lists by placing hashes before each item to be in a list. As with bullets, tiered numbered lists are easy - simply place an extra space before the hash to create an indent as shown below.

# Item 1
# Item 2
x# Item 2.1

gives

  1. Item 1
  2. Item 2
    1. Item 2.1

2 Links

You can create links from any text by wrapping the text in 3 nested square brackets.

If a page address contains disallowed characters (characters that are not valid in URLs) the address will be converted to a "unixi form" to contain only characters that are valid. The text as displayed onscreen will remain the same as the original.

2.1 Internal links

If you type this… …you get this… …which will link to…
[[[link-to-a-page]]] link-to-a-page a page called "link-to-a-page"
[[[link "TO" ą pagE]]] link "TO" ą pagE a page called "link-to-a-page"
[[[category: link to a page]]] link to a page a page called "link-to-a-page" in a category called 'category'
[[[link to a page | random text]]] random text a page called "link-to-a-page" but display 'random text'
[[[link to a page#Section1 | Section 1]]] Section 1 a defined anchor point called Section1 within a page called "link-to-a-page", but display onscreen as 'Section 1'

2.2 Anchors

You can place an anchor point within the text of a page that you can then use as part of a link that will jump straight to that point in the page.

To place an anchor point in the text use [[# anchor-name]]. To create a link in the same page that the anchor point is placed, that jumps to the anchor point, use [#anchor-name Example anchor link text].

To create a link in another page that jumps to the anchor point in page with the anchor point, adjoin the anchor reference to the URL used in the link to the page [http://2011census.wikidot.com#anchor-name Example anchor link text].

2.3 External URLs (World Wide Web links)

If you type this… …you get this… …which …
http://2011uk census.wikidot.com http://2011ukcensus.wikidot.com gives a simple inline link
[http://2011uk census.wikidot.com Home] Home gives a simple inline link with the link text 'Home'
*http://2011uk census.wikidot.com http://2011ukcensus.wikidot.com gives a simple inline link which will open in a new window
[*http://2011uk census.wikidot.com Home] Home gives a simple inline link with the link text 'Home' which will open in a new window

2.4 Email links

If you type this… …you get… …which…
help@example.com moc.elpmaxe|pleh#moc.elpmaxe|pleh gives a simple inline email link
[help@example.com Email us] moc.elpmaxe|pleh#su liamE gives a simple inline email link with the link text 'Email us'

3 Images

You can insert an image into any page using syntax such as:

[[image image-source attribute1="value1" attribute2="value2" ...]]

So an example with some sample attribute values is:

[[image test1.jpg link="http://2011census.wikidot.com" alt="This is a test image" width="200" height="100"]]

which gives

This is a test image

an image 200 pixels wide by 100 pixels high that will open a link to the site homepage in a new window when clicked on. Note that the image file referenced is a local file that will need to be attached to this page. As the file does not exists the alternative text is displayed.

3.1 Image source

The source for an image can be either:

a local file attached to the current page, using the syntax
[[image image name]] (to attach files see 'How to attach a file to a page').

or an image attached to another page, using the syntax
[[image page name/image name]]

or even located on another website, using the syntax
[[image http://website address/image name]]

3.2 Image size

To size an image you need to specify the height and width in pixels as in the example above.

3.3 Using images as links

To make an image into a link to another page or website use

link="page name" or link="URL"

and to open the link in a new page use

link="*page name" or link="*URL"

4 Tables

4.1 Simple tables

You can create simple tables using pairs of vertical bars to indicate cell borders, and by preding column header labels by ~, such as


||~ head 1 ||~ head 2 ||~ head 3 ||
|| cell 1 || cell 2 || cell 3 ||
|| cell 4|| cell 5 || cell 6 ||
||cell 7 || cell 8 || cell 9 ||

which will give

head 1 head 2 head 3
cell 1 cell 2 cell 3
cell 4 cell 5 cell 6
cell 7 cell 8 cell 9

4.2 Advanced tables

You can create more advanced customized tables by using special tags to indicate cell structure and attributes. You can the use style attributes to manage the appearance of cell boders and background colours, as well at the propertiees of the cell contents.

For example the using the following syntax

[[table]]
[[row]]
[[cell style="border: 1px solid black; background-color: yellow;"]]
**cell 1 cell 1 cell1**
[[/cell]]
[[cell style="border: 3px solid green"]]
cell 2
[[/cell]]
[[/row]]
[[row]]
[[cell style="border: 1px solid black; text-align: right; color: red;"]]
cell 3
[[/cell]]
[[cell style="border: 1px solid black; background-color: blue; color: white;"]]
cell 4
[[/cell]]
[[/row]]
[[/table]]

will give a table with this appearance and properties.

cell 1 cell 1 cell1 cell 2
cell 3 cell 4
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License