# Smart links: inline, card and embed in storage format

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

A smart link is a normal a href whose data-card-appearance attribute says how to show it: inline, block or embed. The ADF side has inlineCard, blockCard and embedCard nodes. The three forms did not convert alike, and the embed form returned as an unsupported-content extension.

## Storage format

```xml
<a href="https://example.com" data-card-appearance="inline">https://example.com</a>
<a href="https://example.com" data-card-appearance="block">https://example.com</a>
<a href="https://example.com" data-card-appearance="embed">https://example.com</a>
```

## As ADF (Confluence Cloud)

The ADF that Confluence Cloud builds for:

```xml
ADF:{"content": [{"content": [{"attrs": {"url": "https://example.com"}, "type": "inlineCard"}], "type": "paragraph"}], "type": "doc", "version": 1}
```

```json
{
 "type": "doc",
 "content": [
  {
   "type": "paragraph",
   "content": [
    {
     "type": "inlineCard",
     "attrs": {
      "url": "https://example.com"
     }
    }
   ]
  }
 ],
 "version": 1
}
```

## Examples

Storage format sent:

```xml
<p><a href="https://example.com" data-card-appearance="inline">https://example.com</a></p>
```

A link shown as an inline card, in the middle of a sentence.

Rendered view (HTML):

```html
<p><a class="external-link" data-card-appearance="inline" href="https://example.com" rel="nofollow">https://example.com</a></p>
```

Storage format after the round trip through ADF:

```xml
<p><a href="https://example.com" data-card-appearance="inline">https://example.com</a></p>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<p><a href="https://example.com" data-card-appearance="block">https://example.com</a></p>
```

The same address as a block card on its own line.

Rendered view (HTML):

```html
<p><a class="external-link" data-card-appearance="block" href="https://example.com" rel="nofollow">https://example.com</a></p>
```

Storage format after the round trip through ADF:

```xml
<a href="https://example.com" data-card-appearance="block">https://example.com</a>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<p><a href="https://example.com" data-card-appearance="embed">https://example.com</a></p>
```

The same address as an embed, which shows the page inside the page.

Rendered view (HTML):

```html
<p><a class="external-link" data-card-appearance="embed" href="https://example.com" rel="nofollow">https://example.com</a></p>
```

Storage format after the round trip through ADF:

```xml
<p><a href="https://example.com" data-card-appearance="embed">https://example.com</a></p>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
ADF:{"content": [{"content": [{"attrs": {"url": "https://example.com"}, "type": "inlineCard"}], "type": "paragraph"}], "type": "doc", "version": 1}
```

An inlineCard node sent as ADF, to see the storage Confluence writes.

Rendered view (HTML):

```html
<p><a class="external-link" data-card-appearance="inline" href="https://example.com" rel="nofollow">https://example.com</a></p>
```

Storage format after the round trip through ADF:

```xml
<p><a href="https://example.com" data-card-appearance="inline">https://example.com</a></p>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
ADF:{"content": [{"attrs": {"url": "https://example.com"}, "type": "blockCard"}], "type": "doc", "version": 1}
```

A blockCard node sent as ADF, which Confluence stores without a paragraph.

Rendered view (HTML):

```html
<a class="external-link" data-card-appearance="block" href="https://example.com" rel="nofollow">https://example.com</a>
```

Storage format after the round trip through ADF:

```xml
<a href="https://example.com" data-card-appearance="block">https://example.com</a>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
ADF:{"content": [{"attrs": {"layout": "center", "url": "https://example.com"}, "type": "embedCard"}], "type": "doc", "version": 1}
```

An embedCard node with a layout, which stores the layout as data-layout.

Rendered view (HTML):

```html
<a class="external-link" data-card-appearance="embed" data-layout="center" href="https://example.com" rel="nofollow">https://example.com</a>
```

Storage format after the round trip through ADF:

```xml
<a href="https://example.com" data-layout="center" data-card-appearance="embed">https://example.com</a>
```

Sent to Confluence Cloud on 29 Nov 2026.

## What changes in conversion

- The inline form round-trips both ways: data-card-appearance="inline" and the ADF inlineCard node are the same thing.
- A block card is stored as an a element placed directly in the body with no paragraph around it. The storage-to-ADF conversion of the block form with a paragraph also drops that paragraph.
- The embed form written in storage was read as an extension node named unsupported content, which holds the original markup and a nested embedCard, and returned unchanged. ADF sent as embedCard stores data-layout and data-card-appearance.
- The ADF card nodes carry only the address, so the text between the a tags is not a separate field in the ADF form.

## Pitfalls

- The view of a card is a plain external link, so the card look appears only in the editor, not in the stored HTML.
- An embed written in storage is read by the converter as unsupported content, so the Cloud editor may not offer it as an embed.
- A block card stored with a paragraph around it and one stored without are different markup that the rendered view treats alike.

## Related

- [<a href> external links](https://goingstellar.ro/reference/confluence-storage-format/external-links/)
- [html, iframe and widget macros](https://goingstellar.ro/reference/confluence-storage-format/html-iframe-widget/)
- [jira and jirachart macros](https://goingstellar.ro/reference/confluence-storage-format/jira-macros/)
- [Link bodies: plain text and rich](https://goingstellar.ro/reference/confluence-storage-format/link-bodies/)
- [Storage format vs ADF](https://goingstellar.ro/reference/confluence-storage-format/storage-vs-adf/)

## 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/)

