This page describes the wiki markup used for page templates and in some administration screens in Confluence.

You can use wiki markup to write content for a page template. This content will appear in every page that uses the template. You can also use special form markup if you wish to define form fields that the page author will complete when adding the page.

Markup is also used in the following places:

  • When creating links using the Advanced tab of the Links Browser.
  • When using the Wiki Markup dialog in the Confluence editor (choose Insert > Wiki Markup).
  • When working with some administration screens, such as the Theme Configuration screen.

(info) Please note that documentation for the wiki markup syntax for using macros can be found here in the Confluence 3.5 documentation.

On this page:

Headings

You can use wiki markup to create headings in a page template.

Creating a header is easy. Simply place "hn." at the start of your line (where n can be a number from 1-6).

What you need to type

What you will get

h1. Biggest heading

Biggest heading

h3. Big heading

Big heading

h5. Small heading
Small heading

Note that Confluence treats all headings as anchors.

Lists

Wiki markup allows you to create bulleted or numbered lists, and is flexible enough to allow a combination of the two list types.

(info) If you need to separate the text within lists using line breaks, make sure you do so using a double slash (//). Empty lines may disrupt the list.

Simple lists

Use the hyphen (-) to create simple lists.
Make sure there is a space between the hyphen and your text.

What you need to type

What you will get

- some
- bullet
- points
  • some
  • bullet
  • points

Bulleted lists

Use the asterisk (*) to create bullets. For each subsequent level, add an extra asterisk.
Make sure there is a space between the asterisk and your text.

What you need to type

What you will get

* some
* bullet
** indented
** bullets
* points
  • some
  • bullet
    • indented
    • bullets
  • points

Numbered lists

Use the hash (#) to create numbered lists.
Make sure there is a space between the hash and your text.

What you need to type

What you will get

# a
# numbered
# list
  1. a
  2. numbered
  3. list

A second level of hashes will produce a sub-list, such as the alphabetical sub-list shown below.

What you need to type

What you will get

# Here's a sentence.
## This is a sub-list point.
## And a second sub-list point.
# Here's another sentence.
  1. Here's a sentence.
    1. This is a sub-list point.
    2. And a second sub-list point.
  2. Here's another sentence.

Try a third level of hashes to produce a sub-sub-list.

What you need to type

What you will get

# Here's a sentence.
## This is a sub-list point.
### Third list level.
### Another point at the third level.
## And a second sub-list point.
# Here's another sentence.
  1. Here's a sentence.
    1. This is a sub-list point.
      1. Third list level.
      2. Another point at the third level.
    2. And a second sub-list point.
  2. Here's another sentence.

In numbered lists as described above, the format of the 'number' displayed at each list level may be different, depending upon your browser and the style sheets installed on your Confluence instance. So in some cases, you may see letters (A, B, C, etc; or a, b, c, etc) or Roman numerals (i, ii, iii, etc) at different list levels.

Mixed lists

What you need to type

What you will get

# Here
#* is
#* an
# example
#* of
#* a
# mixed
# list
  1. Here
    • is
    • an
  2. example
    • of
    • a
  3. mixed
  4. list

Tables

You can use wiki markup to create tables in a page template.

Confluence allows you to create two types of tables.

Table Type 1

Allows you to create a simple table with an optional header row. You cannot set the width of the columns in this table.
Use double bars for a table heading row.

What you need to type:

||heading 1||heading 2||heading 3||
|cell A1|cell A2|cell A3|
|cell B1|cell B2|cell B3|

What you will get:

heading 1

heading 2

heading 3

cell A1

cell A2

cell A3

cell B1

cell B2

cell B3

You can also use a vertical header.

What you need to type:

||heading 1|col A1|col A2|col A3|
||heading 2|col B1|col B2|col B3|

What you will get:

heading 1

col A1

col A2

col A3

heading 2

col B1

col B2

col B3

Table Type 2

This method allows you to specify the width of the columns in the table.

What you need to type

{section:border=true}

{column:width=30%}
Text for this column goes here. This is  the smaller column with a width of only 30%.
{column}

{column:width=70%}
Text for this column goes here. This is  the larger column with a width of 70%.
{column}

{section}

 

What you will get

Text for this column goes here. This is the smaller column with a width of only 30%.

Text for this column goes here. This is the larger column with a width of 70%.

(info) For more details please see the Column Macro and the Section Macro.

Advanced Formatting

Colour and Other Formatting

To add colour and other formatting to your tables, you can use the Panel Macro within columns.
More table-formatting options may be available if your Confluence administrator has installed additional macros.

Lists

Here's an example of how to embed lists in a table:

What you need to type

||Heading 1||Heading 2||
|* Item 1
* Item 2
* Item 3|# Item 1
# Item 2
# Item 3|

What you will get

Heading 1

Heading 2

  • Item 1
  • Item 2
  • Item 3
  1. Item 1
  2. Item 2
  3. Item 3

Text Effects

Use the markup shown in the examples below to format the text in your page templates.

What you need to type

What you will get

*strong*

strong

*bold text*

bold text

_emphasis_

emphasis

_italics_

italics
Hint: To italicise parts of a word, add braces (curly brackets) around the underscore. For example,

Thing{_}x_

gives you this: Thingx

??citation??

citation

-deleted-

deleted

+inserted+

inserted

Text with^superscript^

Text withsuperscript

Hint: There are two ways to make superscripts work, when used directly after another word or character:

  • Add a space before the superscript. For example, kg/m ^3^ gives you this: kg/m 3
  • Add braces (curly brackets) around the superscript markup. For example, 
kg/m{^3^}

gives you this: kg/m3

Text with~subscript~

Text withsubscript
{{monospaced}}

 

 

monospaced

bq. Here's how you make a paragraph appear as a block quotation.

Here's how you make a paragraph appear as a block quotation.

{color:red}look ma, red text!{color}

look ma, red text!

Text Breaks

Paragraph Break

In a Confluence page template, a continuous line of text with two carriage returns at its end forms a paragraph. This is equivalent to a continuous line of text followed by a blank line.

When rendered into HTML, the result is a line of text wrapped in a set of <p></p> tags.

Line Break

Confluence provides two options for forcing a line break within a paragraph of text:

  • Implicitly, by entering a single carriage return at its end.
  • Explicitly, by entering two consecutive backslashes:  \\

When rendered into HTML, the result is a paragraph of text that is split into separate lines by <br> tags, wherever a forced line break appears.

(info) For most purposes, explicit line breaks are not required because a single carriage return is enough.

The examples below show how to use explicit line breaks.

What you need to type

What you will get

here is some text

\\
divided \\
using line \\  \\ 
breaks\\

here is some text
divided
using line

breaks

This is a short list:
* Point 1
Text to go with point 1
* Point 2

 \\  \\

Text to go with point 2 with a break

This is a short list:

  • Point 1
    Text to go with point 1
  • Point 2

    Text to go with point 2 with a break

If you wish to use multiple consecutive line breaks, each should be separated by a space character. For example, use

\\ \\

for two consecutive line breaks.

Horizontal Rule

Use four dashes (----) to create a horizontal rule.

(info) Make sure that the dashes are on a separate line from the rest of the text.

What you need to type

What you will get

here is some text

----

divided by a horizontal rule

here is some text


divided by a horizontal rule

You can use wiki markup to create links in a page template.

What you need to type

What you will get

[#anchor]

A link to an anchor on the same page.

[Confluence Wiki Markup^attachment.ext]

A link to a file attached to the page.

[pagetitle]

A link to a page.

[pagetitle#anchor]

A link to an anchor on another page.

[pagetitle^attachment.ext]

A link to a file attached to another page.

[spacekey:pagetitle]

A link to a page in another space.

[spacekey:pagetitle#anchor]

A link to an anchor on a page in another space.

[spacekey:pagetitle^attachment.ext]

A link to a file attached to a page in another space.

[/2004/01/12/blogposttitle]

A link to a blog post.

[spacekey:/2004/01/12/blogposttitle]

A link to a blog post in another space.

[/2004/01/12]

A link to a whole day's blog posts.

[spacekey:/2004/01/12]

A link to a whole day's blog posts in another space.

[spacekey:]

A link to the space homepage (or the space summary page of the space.

[~username]

A link to the user profile page of a particular user.

[phrase@shortcut]

A shortcut link to the specified shortcut site. Shortcuts are configured by the site administrator.

[http://confluence.atlassian.com]

A link to an external resource.

[mailto:legendaryservice@atlassian.com]

A link to an email address.

[file://z:/file/on/network/share.txt]

A link to a file on your computer or on a network share that you have mapped to a drive. This only works on Internet Explorer.

Note that Confluence treats headings as anchors, so you can link to headings using this pattern: [spacekey:pagename#headingname], where headingname is case-sensitive and must be entered without spaces.

For each of these link forms:

  • You can prepend a link alias, so that alternate text is displayed on the page. Example: [link alias|pagetitle#anchor]
  • You can append a link tip, which appears as a tooltip. Example: [pagetitle#anchor|link tip]

Images

Images, from attached files or remote sources, can be displayed in a page template.

What you need to type

What you will get

!http://www.host.com/image.gif!

An image from a remote source is displayed on the page. Uses a fully qualified URL.

!attached-image.gif!

An image file attached to the page is displayed.

!pageTitle^image.gif!

An image file attached to a different page is displayed.

!spaceKey:pageTitle^image.gif!

An image file attached to a page in a different space is displayed.

!/2010/05/23/My Blog Post^image.gif!

An image file attached to a blog post is displayed.

!image.jpg|thumbnail!

The image is displayed as a thumbnail on the page (only works with images that are attached to the page). Users can click on the thumbnail to see the full-sized image. Thumbnails must be enabled by the site administrator for this to work.

!image.gif|align=right, vspace=4!

For any image, you can specify attributes of the HTML image tag as a comma separated list of name=value pairs.

Available HTML image tags include:

Image tag

Details

align

Available values are 'left', 'right', 'bottom', 'center', 'top'.

border

Specifies the width of the border (in pixels).

bordercolor

Use with the 'border' tag. Specify colours by name or hex value.

hspace

Specifies the amount of whitespace to be inserted to the left and right of the image (in pixels).

vspace

Specifies the amount of whitespace to be inserted above and below the image (in pixels).

width

Specifies the width of the image (in pixels). This will override the natural width of the image.

height

Specifies the height of the image (in pixels). This will override the natural height of the image.

title

Specifies alternate text for the image, which is displayed when the pointer hovers over the image.

alt

Specifies alternate text for the image. This text is retrievable via search, and contributes to accessibility of the page for text-only viewing.

Related Topics

Form Field Markup for Templates
Global Templates
Importing Templates
Adding a Template
Creating a Page using a Template

Take me back to the Confluence User's Guide.

  • No labels

2 Comments

  1. Anonymous

    I get some weird reformatting in Confluence 4.1 when I try to use hash and asterisk (# and ) to create complex lists directly in the editor. I type hash for the first sentence, and when I press ENTER to move to the next line, I can't enter a bullet (by typing #*) – the second line is already formatted as numbered list and doesn't accept the hash or asterisk as markup.

    I wish there was some access to the coding that formats Confluence pages. I find the editor as frustrating some times as the very first HTML editors from years ago, which let you do some formatting but produced weird HTML that you couldn't edit. I can't believe this is the editor I have to use just to have a wiki in 2012.

    By the way, just typing this note caused have of the first sentence to switch to bold when I typed the close parentheses above. Sheesh. 

    1. Anonymous

      The new editing interface was developed to allow the common, Word-familiar user comfortable with creating a wiki. If you're looking for a more old-school approach, you can still enter raw markup using the Wiki Markup insert.

      On to your question: There are a couple of ways to get what you're looking for

      1. Just like with modern word formatting programs, you can use the bulleted-list and numbered-list buttons in the edit bar to switch the current list item's style
      • Which I did here...
        1. and again here with a <tab> to indent to a sub-list.
        • Whoa, see what I did there?

      OR

      You can insert a Wiki Markup and create the list as you described. Note, however, that the third sub-item will be reset to "1."  If you're running into that issue, then perhaps you should reconsider how you are presenting the data.

      Wiki Markup
      # First item
      * Second item
      ## First sub-item
      ** Second sub-item
      ## Third sub-item

       

      1. First item
      • Second item
        1. First sub-item
        • Second sub-item
        1. Third sub-item

       

      As to your half-bolded sentence, surrounding text with "*" causes the content inside to be bolded. This is common practice in modern text editors. You can get around it by including a space on either side or "*"surrounding"*" it in quotes (there are plenty of other ways too). Ideally, the editor would allow you to switch between basic-editor and wiki-editor on the fly, but with what you're trying to do, it sounds like you would be most comfortable working in a Wiki Markup module.

      I hope this helps.