Wikitext Guide
Wikitext is used to make text look more interesting by applying styling, formatting, hyperlinks and so on. The syntax for using wikitext in this site is set out in the examples below.
If you have a browser enabled for JavaScript, you will find quick entry buttons beside the inputs where you can enter wikitext.
For emphasis and headings you select the required text then click the button. For other wikitext formatting you place the
cursor where it is required then clicking the button will insert template text of the appropriate form. Clicking the 'Preview'
button will open a new page to show you how your page will look.
Contents
- Headings
- Paragraphs, new lines and rules
- Columns
- Emphasis
- Questions and Answers
- List items
- Quoted text
- Hyperlinks to web resources
- Hyperlinks to items in this site
- Images
- Linking from embedded images
- Listing collections
- Emoticons
- Content restricted to logged in users
- Tables
- Comments
- Restricted access sections
- Appendix: Document Summary
1. Headings
Use the '=' sign to mark headings:
==First level heading==
===Second level heading===
====Third level heading====
These will appear as follows:
First level heading
Second level heading
Third level heading
(Wikitext editor buttons: H1, H2, H3)
2. Paragraphs, new lines and rules
A new paragraph can be created by entering carriage return twice.
You can force a new line by entering ‘
’ followed by a carriage return:
Lorem ipsum dolor sit amet,
consectetur adipisicing elit,
sed do eiusmod tempor ...
This is rendered as shown below:
Lorem ipsum dolor sit amet,
consectetur adipisicing elit,
sed do eiusmod tempor ...
(Wikitext editor button: br)
A horizontal rule can be added by entering '-----'.
(Wikitext editor button: hr)
3. Columns
Use firstcol, nextcol and endcols keywords with '---' to split your text into columns:
---firstcol---
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
---nextcol---
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
---endcols---
This generates two columns
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
(Wikitext editor button: New Col.)
4. Emphasis
Use single quotes to emphasize text with italic or bold styles:
''standard emphasis''(i.e. italics)
'''strong emphasis'''(i.e. bold)
This would be rendered as:
standard emphasis
strong emphasis
(Wikitext editor buttons: I, B)
5. Questions and Answers
Use 'Q' and 'A' pairs to mark questions and answers:
Q: What is the meaning of life, the universe and everything?
A: Forty-two.
These will appear as:
- What is the meaning of life, the universe and everything?
- Forty-two.
6. List items
Use '*' to mark unnumbered list items and '#' to mark numbered list items:
*An unnumbered list item
*Another unnumbered list item
#A numbered list item
#Another numbered list item
*An unnumbered list item
*Another unnumbered list item
*#A nested numbered list item
*#Another numbered list item
These will appear as shown below:
- An unnumbered list item
- Another unnumbered list item
- A numbered list item
- Another numbered list item
- An unnumbered list item
- Another unnumbered list item
- A nested numbered list item
- Another numbered list item
(Wikitext editor buttons: *, 1.)
7. Quoted text
Use '>' to mark blocks of quoted text, which will be indented and preserve paragraphs (you can also combine this with some other features of wikitext such as italics):
>''Lorem''ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
>
>Duis '''aute'''irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
This appears as shown below:
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
(Wikitext editor button: Quote)
8. Hyperlinks to web resources
Hyperlink text is converted to a hyperlink automatically, but you can also supply labels for your hyperlinks and you can link to pages within this site:
http://news.bbc.co.uk/
[http://news.bbc.co.uk/ BBC news](a hyperlink with label)
[/wikitext.aspx A page on this site]
These links appear as shown below:
http://news.bbc.co.uk/
BBC news
A page on this site
Internal anchors
You can also create links to anchors on the same page. Each heading on the page automatically has an anchor added (you can see the name of the anchor by viewing the source of the page). For example, the Emoticons section on this page has an anchor '_13-emoticons' and you can link to it with the following example:
[/wikitext.aspx#_13-emoticons Emoticons section]
This link appears as shown below:
Emoticons section
To create an internal anchor, follow these steps:
- Create a heading where you want the anchor to be;
- Save the Page and view its source;
- Find the heading you entered;
- Use the contents of the id attribute of the heading element to form your link as described above.
Opening links in new windows
Use the 'target' syntax to open a link in a new window:
[http://news.bbc.co.uk/ target:_blank BBC news]
Here is the link:
BBC news
(Wikitext editor button: http:)
9. Hyperlinks to items in this site
If you know the ID of an item in this site you can link to it by using two square brackets with the keyword RESOURCE. If you do not specify a title for the hyperlink, the title of the item is used by default:
[[RESOURCE:13554]]
[[RESOURCE:13554 A different title]]
The above syntax is rendered as follows:
Topic page: Alcohol
A different title
The 'Choose Link...' button allows you to search for items on this site if you do not already know the ID that you want.
(Wikitext editor button: Choose Link...)
10. Images
Embed images by using two square brackets instead of one and using the keyword 'Image'. Ideally images should be given ALT text, which you separate from the web address using a space:
[[Image:http://www.hyperspheric.com/images/pageLayout/vcss.gif]]
[[Image:http://www.hyperspheric.com/images/pageLayout/vcss.gif CSS]]
Note that the earlier version of wikitext used the '|' separator for the ALT text - this is now obsolete. The embedded images are shown below:


Align images by using the 'align' keyword, which can have the values 'left', 'right' or 'none'. For example, the second image in the columns below will float to the right of the column:
---firstcol---
[[Image:http://www.hyperspheric.com/images/hands_resized.jpg Alt-Text]]
---nextcol---
[Image:http://www.hyperspheric.com/images/hands_resized.jpg align:right Alt-Text]]
---endcols---
This looks like:
(Wikitext editor button: Image)
11. Linking from embedded images
If you want to add a hyperlink to an embedded image, add the 'link' keyword with the URL of the link:
[[Image:http://www.hyperspheric.com/images/hands_resized.jpg link:http://www.hyperspheric.com/ CSS]]
The image will appear as follows:

12. Listing collections
If you have gathered some items as members of a collection, you can use the ID of the collection to display the members in a list, table or tree format. There are a number of options that you can use to modify the way the collection is displayed:
- format: Choose from 'list', 'table' or 'tree'
- description: Whether to display the collection and/or members' descriptions - choose from 'none', 'collection', 'members' or 'both'
- order: Sort order for members - choose from 'title' (alphabetical sort) or 'chrono' (sort by creation date)
- listmembers: How many members to list
- allow: Restrict members to a certain resource type only (at present only 'data' is offered)
- showTitle: choose 'false' to suppress the display of the collection title (default is 'true')
Examples of these are given below.
[[Collection:13554 format:list description:both]]
[[Collection:13554 format:table]]
[[Collection:13554 format:tree showTitle:false]]
The examples above are rendered as follows:
Topic page: Alcohol
Alcohol can be a pleasure but it is also burden: on healthcare, criminal justice, and social and economic development.
This collection brings together relevant reports, presentations, data (e.g. on consumption and trends), mortality (e.g. on liver disease and cirrhosis), and alcohol related links and organisations.
Note that you can show a collection's description and/or the descriptions of the members of the collection using the 'description' keyword as in the first example above. The options available are 'none', 'collection' (show collection description only), 'members' (show members' descriptions only), 'both'.
You can add additional modifiers if you want to change the ordering, number or resource type of the displayed collection members:
[[Collection:13554 listmembers:5 order:chronoCreated format:table]] (chronologically ordered on the date that the item was added to the database)
[[Collection:13554 listmembers:5 order:chronoIssued format:table]] (chronologically ordered on the publication date of the item)
[[Collection:13554 listmembers:5 order:title format:list]] (top three, ordered alphabetically by title)
[[Collection:13554 listmembers:5 order:revTitle format:list]] (top three, ordered reverse-alphabetically by title)
[[Collection:13554 listmembers:5 order:title allow
ata format:table]] (only 'data' is allowed as a resource type filter at present)
These examples would be displayed like this:
Topic page: Alcohol
Topic page: Alcohol
Note that the date displayed in the table is the publication date but not all resources will have publication dates. It is not the same as the date that the item was added to the database.
(Wikitext editor button: List Collection)
13. Emoticons
Emoticons can be generated by the following character combinations:
:-) :) ;-) ;) :-D :D :-( :( :'-( :'( :-O :O
These appear as the following icons:
(Wikitext editor button: :))
14. Content restricted to logged-in users
It is possible to restrict parts of your page from anonymous users using the syntax below:
<-LoggedInUsersOnly: Only logged in users will be able to see this section
->
If you are not logged in you will not see this text:
(Wikitext editor button: Members only)
15. Tables
The wikitext for tables can get quite complicated, but at its simplest cells are marked with a '|' character, rows are marked with a '|-', and the whole table is contained between '{|' and '|}'. You must include a new line after the table.
Two simple tables are shown below, using either of two types of syntax to define table cells:
{|border="1"
| Row 1, Col 1
| Row 1, Col 2
|-
| Row 2, Col 1
| Row 2, Col 2
|}
or
{|border="1"
| Row 1, Col 1 || Row 1, Col 2
|-
| Row 2, Col 1 || Row 2, Col 2
|}
Both of these look like:
| Row 1, Col 1
| Row 1, Col 2
|
| Row 2, Col 1
| Row 2, Col 2
|
The border attribute has been added because the default setting for tables is to show no borders.
Add headers to columns using the '!' character; similarly you can add headers to rows by starting them with the '!' character instead of '|'. You can add inline items (e.g. bold, italics) within a header cell but not block elements such as lists.
To add a caption to the table, use '|+' at the start of the table:
{|border="1"
|+ Table caption can include [/default.aspx links]
! Column heading 1 !! Column heading 2 !! Column heading 3
|-
! Row heading 1
| Cell 2 || Cell 3
|-
! Row heading A
| Cell B
| Cell C
|}
This is rendered as follows:
| Column heading 1
| Column heading 2
| Column heading 3
|
|---|
| Row heading 1
| Cell 2
| Cell 3
|
|---|
| Row heading A
| Cell B
| Cell C
|
|---|
Column widths can be set using the '!' character:
{| border="1" cellpadding="2" style="width:500px;"
!width="100"|Heading A
!width="200"|Heading B
!width="200"|Heading C
|-
| Cell A1 || Cell B1 || Cell C1
|-
| Cell A2 || Cell B2 || Cell C2
|}
This is what this table looks like:
| Heading A
| Heading B
| Heading C
|
|---|
| Cell A1
| Cell B1
| Cell C1
|
| Cell A2
| Cell B2
| Cell C2
|
You can add attributes to cells much as you would in HTML:
{| border="1" cellpadding="3" style="width:200px; height:200px"
| bgcolor="red" | row 1, cell 1
| row 1, cell 2
| row 1, cell 3
|-
| row 2, cell 1
| row 2, cell 2
| row 2, cell 3
|}
| row 1, cell 1
| row 1, cell 2
| row 1, cell 3
|
| row 2, cell 1
| row 2, cell 2
| row 2, cell 3
|
Tables can also have rowspans:
{| align="right" border="1" style="width:500px;"
| Col 1, row 1
|rowspan="2"| Col 2, row 1 (and 2)
| Col 3, row 1
|-
| Col 1, row 2
| Col 3, row 2
|}
| Col 1, row 1
| Col 2, row 1 (and 2) | Col 3, row 1
|
| Col 1, row 2
| Col 3, row 2
|
as well as colspans:
{| border="1" cellpadding="5" cellspacing="0" style="width:500px;"
|-
| Column 1 || Column 2 || Column 3
|-
| A
| colspan="2" align="center"| Row 2, col 1 (and 2)
|}
| Column 1
| Column 2
| Column 3
|
| A
| Row 2, col 1 (and 2) |
Note: If you want to include block items such as lists within a table, they need to be separated from the rest of the table with new lines:
{|border="1" style="width:300px;"
|
*Item 1
*Item 2
| Row 1, Col 2
|-
| Row 2, Col 1
|
Q:Question
A:Answer
|}
This looks like:
| Row 1, Col 2
|
| Row 2, Col 1
| - Question
- Answer
|
Note also that you cannot nest tables inside tables.
(Wikitext editor button: New table)
You can add comments within wikitext that will not appear in the rendered page. Note that the comments will not be rendered as HTML comments either.
Example (you will not be able to see the comment):
<-- A comment -->
17. Restricted access sections
Parts of the Page can be hidden from users who are not logged on. Use the 'LoggedInUsersOnly' syntax to mark up such a section (if you are not logged in you will not see the restricted section):
<-LoggedInUsersOnly: This text is for logged in users only. ->
Appendix: Document Summary
- September 2008: First version
- November 2008: Alignment of images (section 10), linking from embedded images (section 11), adding descriptions to listed collections (section 12).
- January 2009: Content restriction (section 14) and tables (section 15) added.
- April 2009: Collection ordering and suppression of collection title (section 12), opening links in new windows (section 8), comments (section 16) and restricted access sections (section 17) added.