Documentation for Confluence 5.4.
Documentation for Confluence OnDemand and earlier versions of Confluence is available too.

Skip to end of metadata
Go to start of metadata

This page describes the XHTML-based format that Confluence uses to store the content of pages, page templates, blueprints, blog posts and comments. This information is intended for advanced users who need to interpret and edit the underlying markup of a Confluence page.

We refer to the Confluence storage format as 'XHTML-based'. To be correct, we should call it XML, because the Confluence storage format does not comply with the XHTML definition. In particular, Confluence includes custom elements for macros and more. We're using the term 'XHTML-based' to indicate that there is a large proportion of HTML in the storage format.

On this page:

Headings

Format type

In Confluence 3.5 and earlierIn Confluence 4.0 and laterWhat you will get 
Heading 1

h1. Heading 1

Underlined in the Documentation Theme
Heading 2
h2. Heading 2

Underlined in the Documentation Theme
Heading 3
h3. Heading 3

 
Headings 4 to 6 are also available and follow the same pattern    

 

Text effects

Format type

In Confluence 3.5 and earlierIn Confluence 4.0 and laterWhat you will get 
strong/bold
*strong*
strong<b> will also work but get converted to <strong> upon saving
emphasis
_emphasis_
emphasis<i> will also work but get converted to <em> upon saving
strikethrough
-strikethrough-
strikethrough<s> and <del> will also work
underline
+underline+
underline 
superscript
^superscript^
superscript 
subscript
~subscript~
subscript 
monospace
{{monospaced}}
monospaced 
preformattedn/a

 

 

preformatted text
 
block quotes
bq. block quote

or

{quote} 
block
quote
{quote}
block quote
 
text colour
{color:red}red text{color}
red text 
small n/a

 

 

small text

 
bign/a

big text

 
center-alignn/a
centered text 
right-alignn/a

right aligned text

 

Text breaks

Format type

In Confluence 3.5 and earlierIn Confluence 4.0 and laterWhat you will get
New paragraph
Paragraph 1
(empty line)
Paragraph 2 

Paragraph 1

Paragraph 2

Line break
Line 1 \\ Line 2

Note: Created in the editor using Shift + Return/Enter

Line 1
Line 2 
Horizontal rule----

— symbol

---

– symbol--

Lists

Format type

In Confluence 3.5 and earlerIn Confluence 4.0 and laterWhat you will get
Unordered list – round bullets
* Round bullet list item
  • Round bullet list item
Ordered list (numbered list)
# Ordered list item
  1. Ordered list item
Task Lists
[] Task list item
  • task list item

Format type

In Confluence 3.5 and earlierIn Confluence 4.0 and laterWhat you will get
Link to another Confluence page
[Link to another Confluence page|Page Title]
Link to another Confluence page
Link to an attachment
[Link to an attachment^atlassian_logo.gif]


Link to an attachment
Link to an external site
[Atlassian|http://www.atlassian.com/]
Atlassian
Anchor link (same page)
[Anchor Link|#anchor]
Anchor Link
Anchor link (another page)
[Anchor Link|pagetitle#anchor]
Anchor Link
Link with an embedded image for the body[!google.png!|pagetitle#anchor]
Icon

For rich content like images, you need to use ac:link-body to wrap the contents.

 

A note about link bodies

All links received from the editor will be stored as plain text by default, unless they are detected to contain the limited set of mark up that we allow in link bodies. Here are some examples of markup we support in link bodies.

An example of different link bodies

 

The markup tags permitted within the <ac:link-body> are <b>, <strong>, <em>, <i>, <code>, <tt>, <sub>, <sup>, <br> and <span>.

Images

Format type

In Confluence 3.5 and earlierIn Confluence 4.0 and laterWhat you will get
Attached image
!atlassian_logo.gif!
External image
!http://confluence.atlassian.com/images/logo/confluence_48_trans.png!

Supported image attributes (some of these attributes mirror the equivalent HTML 4 IMG element): 

NameDescription
ac:alignimage alignment
ac:borderSet to "true" to set a border
ac:classcss class attribute.
ac:titleimage tool tip.
ac:stylecss style
ac:thumbnailSet to "true" to designate this image as a thumbnail.
ac:altalt text
ac:heightimage height
ac:widthimage width
ac:vspacethe white space on the top and bottom of an image
ac:hspacethe white space on the left and right of an image

Tables

Format type

In Confluence 3.5 and earlierIn Confluence 4.0 and laterWhat you will get 
Two column, two row (top header row)
||Table Heading Cell 1||Table Heading Cell 2||
|Normal Cell 1|Normal Cell 2|
Table Heading Cell 1Table Heading Cell 2
Normal Cell 1Normal Cell 2
Two column, three rows, 2nd and third with merged cells in first rowN/A
Table Heading Cell 1Table Heading Cell 2
Merged CellNormal Cell 1
Normal Cell 2

Page layouts

Confluence supports page layouts directly, as an alternative to macro-based layouts (using, for example, the section and column macros). This section documents the storage format XML created when these layouts are used in a page.

Notes:

Element nameIn Confluence 5.2 and laterAttributes
ac:layout

Indicates that the page has a layout. It should be the top level element in the page.

None
ac:layout-section

Represents a row in the layout. It must be directly within the ac:layout tag. The type of the section indicates the appropriate number of cells and their relative widths.

 

ac:type
ac:layout-cellRepresents a column in a layout. It must be directly within the ac:layout-section tag. There should be an appropriate number of cells within the layout-section to match the ac:type.None

The recognised values of ac:type for ac:layout-section are:

ac:type

Expected number of cells

Description

single

1One cell occupies the entire section.
two_equal 2Two cells of equal width.
two_left_sidebar 2A narrow (~30%) cell followed by a wide cell.
two_right_sidebar 2A wide cell followed by a narrow (~30%) cell.
three_equal 3Three cells of equal width.
three_with_sidebars 3A narrow (~20%) cell at each end with a wide cell in the middle.

The following example shows one of the more complicated layouts from the old format built in the new. The word {content} indicates where further XHTML or Confluence storage format block content would be entered, such as <p> or <table> tags.

Emoticons

Format type

In Confluence 3.5 and earlierIn Confluence 4.0 and laterWhat you will get
Emoticons:) 

(smile)

 :(  
(sad)
 :P  
(tongue)
 :D  
(big grin)
 ;)  
(wink)
 (y)  
(thumbs up)
 (n)  
(thumbs down)
 (i)  
(info)
 (/)  
(tick)
 (x)  
(error)
 (!)
(warning)

Resource identifiers

Resource identifiers are used to describe "links" or "references" to resources in the storage format. Examples of resources include pages, blog posts, comments, shortcuts, images and so forth. 

Resource

Resource identifier format
Page

Notes:

  • ri:space-key: (optional) denotes the space key. This can be omitted to create a relative reference.
  • ri:content-title: (required) denotes the title of the page.
Blog Post

Notes:

  • ri:space-key: (optional) denotes the space key. This can be omitted to create a relative reference.
  • ri:content-title: (required) denotes the title of the page.
  • ri:posting-day: (required) denotes the posting day. The format is YYYY/MM/DD.
Attachment

Notes:

  • ri:filename: (required) denotes the name of the attachment.
  • the body of the ri:attachment element should be a resource identifier denoting the container of the attachment. This can be omitted to create a relative attachment reference (similar to [foo.png] in wiki markup).

Examples:

Relative Attachment Reference
Absolute Attachment Reference
URL

Notes:

  • ri:value: (required) denotes the actual URL value.
Shortcut

Notes:

  • ri:key: (required) represents the key of the Confluence shortcut.
  • ri:parameter: (required) represents the parameter to pass into the Confluence shortcut.
  • The example above is equivalent to [ABC-123@jira] in wiki markup.
User

Notes:

  • ri:userkey: (required) denotes the unique identifier of the user.
Space

Notes:

  • ri:space-key: (required) denotes the key of the space.
Content Entity

Notes:

  • ri:content-id: (required) denotes the id of the content.

Template variables

This screenshot shows a simple template:

The template contains the following variables:

Variable nameTypeValues
$MyTextSingle-line text 
$MyMultiMulti-line textSize: 5 x 100
$MyListListList items: Apples,Pears,Peaches

The XML export produces the following code for the template:

Instructional Text

Instructional text allows you to include information on how to fill out a template for an end-user (the person using creating a page from the template). Instructional text will:

  • automatically clear all instructional text as the user types in a specific text block, and
  • automatically trigger a @mention prompt for user selection (for 'mention' type instructional text).

Screenshot: Example of instructional text.

  • No labels

13 Comments

  1. Is there any way to list up the entire documents which is not updated one year? And with author name?

    1. Dong,

      Is there any way to list up the entire documents which is not updated one year? And with author name?

      Yes. You can do just about anything you want if you develop your own code that uses the Confluence API or uses SQL to query the database.

      However, if you prefer not to do that, then I think that you can get almost what you want using the Search Results macro with a query parameter that specifies a date range for the modified field.

      I say "almost", because the method that I am about to describe uses absolute, not relative, dates. I do not know how to - or even whether you can - specify relative dates using this method.

      I've added this comment in the hope that someone with more experience will read it, laugh, and then offer a better solution.

      Here (since we are on the Confluence Storage Format page (smile) ) is some sample XML:

      I think that the above example should return a list (that includes author name and modified date) of up to 200 pages that were not updated in the last year (that is, were not modified between 15 May 2011 and 15 May 2012).

      I write "should", because, although I get results that meet the specified date criteria, I am a little unsure about the behavior of the maxLimit parameter combined with the sorting of the results. Perhaps there's no problem here. Try it yourself.

      Note the yyyymmdd format of the dates in the date range. This is what I meant by "almost" what you want; I don't know how to specify relative dates here. Also, this yyyymmdd date format works in Confluence 4 (at least, it works for me!). I have an inkling that, in previous versions of Confluence (3.x), the date format might depend on your installation-specific Confluence settings.

      Here, I am deliberately using type:page as the first term in the query string in place of the type named parameter of the Search Results macro. ("The NOT operator cannot be used with just one term.")

      Here is the equivalent wiki markup (that you can insert into the Confluence 4 rich text editor by selecting the Insert > Wiki Markup option, or by pressing Ctrl+Shift+D):

      (Incidentally, I created the above wiki markup by pasting the previously cited XML into Wikifier. It's interesting (at least, to me) that I had to do that to offer a halfway-human-readable "serialized form" - the wiki markup - of the macro call and its parameters... and a string that can be inserted in the rich text editor - albeit via the Insert > Wiki Markup option - without requiring the Source Editor plugin.)

      As far as I understand it (not very far), the query parameter of the Search Results macro uses the format of a Lucene query string.

      Finally, I am not sure that this page is the most appropriate place to ask your question. This page is specifically about the Confluence Storage Format; your question isn't. You might have better luck - and get a better-informed answer (wink) ! - at Atlassian Answers.

    2. Hi again Dong,

      I have added a comment on the Confluence SQL Plugin page that demonstrates a {sql-query} macro that (I think (smile) ) does exactly what you want. (That is, if, by "documents", you mean "Confluence pages".)

      I added the comment to that page, rather than here, because I think that page is a more appropriate place. Users who have more experience than me with the SQL plugin are more likely to see the comment there, and offer corrections or improvements.

      (Page administrator: please feel free to move - or delete! - my replies to Dong's original comment as you see fit. I hope that my comments are relevant to Dong's question, but you might feel that Dong's question and my replies are not appropriate for this particular page. Your call, no question.)

  2. hello,

    As Customware lost the ability to link to a parent page with an image as the link to click on, i was wondering if Atlassian has put this new feature within Confluence with the new Stograge format ?

    This is mainly for template as the parent page could be any page in the space.

     

    What i used to do before:

    Something I will do now:

    The new feature will know to link to the parent page of course (wink)

     

     

  3. Could there be a page line missing from the Anchor link example (with pagetitle)? 

     

     
    1. Thanks Mary-Jane Smyth, you are correct. I'll update the documentation. The ac:anchor attribute was also incorrect.

  4. Anonymous

    Hi there,

    Is there a code to Unselect the task lists in one go ( a series of tasks on a Confluence page)? Without using the tasklist macro.

    Let me know if there is. 

    Thanks.

  5. Confluence 5.1.1 doesn't seem to be honoring line breaks within <pre> elements.

    1. As in  CONF-28582 - Code macro does not maintain empty lines when copy and pasted Open  Kevin?  Which seems to be an on-paste issue rather than on-save.

  6. How do you assign someone permissions to the editor (e.g. meet the #2 option in your list).  We have to significantly limit the number of Confluence administrators, but want each space administrator to be able to have access to this. But, I cannot locate information on how to assign/manage these permissions.

  7. I am looking to link parts of very complex process diagrams to other documents an pages in confluence.  in HTML i would use the map tag.

    Another way to do this is through a PDF file that contains embedded links ( to other confluence pages).

     

    Neither of these seem to work in confluence.  Can you provide suggestions?

  8. I can't see any of the xhtml on this page. All I see is round-ended boxes with dotted lines. Is this a browser issue?

    ?!?

    1. Sounds like it might be, it looks okay in the browsers I have just tried. Could you please let me know what OS and Browser you're using so we can investigate.  Thanks!