# Underline (u) in Confluence storage format

URL: https://goingstellar.ro/reference/confluence-storage-format/underline/

Underline is the u element. Storage keeps it as written, ADF represents it as an underline mark, and the round trip returns the same element.

## Storage format

```xml
<u>underline</u>
```

## As ADF (Confluence Cloud)

The ADF that Confluence Cloud builds for:

```xml
<p><u>underline</u></p>
```

```json
{
 "type": "doc",
 "content": [
  {
   "type": "paragraph",
   "content": [
    {
     "text": "underline",
     "type": "text",
     "marks": [
      {
       "type": "underline"
      }
     ]
    }
   ]
  }
 ],
 "version": 1
}
```

## Examples

Storage format sent:

```xml
<p><u>underline</u></p>
```

Underlined text as written in the storage format documentation.

Rendered view (HTML):

```html
<p><u>underline</u></p>
```

Storage format after the round trip through ADF:

```xml
<p><u>underline</u></p>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
ADF:{"content": [{"content": [{"marks": [{"type": "strong"}], "text": "b", "type": "text"}, {"text": " ", "type": "text"}, {"marks": [{"type": "underline"}], "text": "u", "type": "text"}, {"text": " ", "type": "text"}, {"marks": [{"type": "strike"}], "text": "s", "type": "text"}, {"text": " ", "type": "text"}, {"marks": [{"type": "code"}], "text": "c", "type": "text"}, {"text": " ", "type": "text"}, {"marks": [{"attrs": {"type": "sup"}, "type": "subsup"}], "text": "sup", "type": "text"}, {"text": " ", "type": "text"}, {"marks": [{"attrs": {"color": "#ff5630"}, "type": "textColor"}], "text": "red", "type": "text"}, {"text": " ", "type": "text"}, {"marks": [{"attrs": {"color": "#fedec8"}, "type": "backgroundColor"}], "text": "hl", "type": "text"}], "type": "paragraph"}], "type": "doc", "version": 1}
```

An ADF paragraph with seven different marks. The underline mark is written as u next to strong, del, code, sup and two span styles.

Rendered view (HTML):

```html
<p><style>[data-colorid=ygsqugo5p0]{color:#ff5630} html[data-color-mode=dark] [data-colorid=ygsqugo5p0]{color:#cf2600}</style><strong>b</strong> <u>u</u> <del>s</del> <code>c</code> <sup>sup</sup> <span data-colorid="ygsqugo5p0">red</span> <span style="background-color: rgb(254,222,200);">hl</span></p>
```

Storage format after the round trip through ADF:

```xml
<p><strong>b</strong> <u>u</u> <del>s</del> <code>c</code> <sup>sup</sup> <span style="color: rgb(255,86,48);">red</span> <span style="background-color: rgb(254,222,200);">hl</span></p>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<p><span style="text-decoration: line-through;">strikethrough</span></p>
```

Contrast case. A text-decoration span is not an ADF mark, so the same span form for underline cannot be assumed to survive an editor save.

Rendered view (HTML):

```html
<p><span style="text-decoration: line-through;">strikethrough</span></p>
```

Storage format after the round trip through ADF:

```xml
<p>strikethrough</p>
```

Sent to Confluence Cloud on 29 Nov 2026.

## What changes in conversion

- u maps one to one to the ADF underline mark and comes back as u.
- The u element carries no style attribute, unlike the documented strikethrough span, and it came back unchanged.

## Pitfalls

- Underline set through a CSS style was not probed, so only the u element is covered by these examples.
- A multi-mark paragraph can be written in storage and read back with every mark intact, as the second example shows.

## Questions and answers

### Does an ADF save keep the u element?

Yes. It is stored as an underline mark and written back as u.

## Related

- [<strong>, <em>, <b> and <i>](https://goingstellar.ro/reference/confluence-storage-format/bold-italic/)
- [Strikethrough](https://goingstellar.ro/reference/confluence-storage-format/strikethrough/)
- [Text color](https://goingstellar.ro/reference/confluence-storage-format/text-color/)
- [Text highlight](https://goingstellar.ro/reference/confluence-storage-format/background-highlight/)
- [<sup> and <sub>](https://goingstellar.ro/reference/confluence-storage-format/superscript-subscript/)

## Sources

- [Confluence storage format (Atlassian Documentation)](https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html)
- [Atlassian Document Format: document structure (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)

