How to clear hidden formatting and unwanted HTML tags in page
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
It can happen that a Confluence page unexpectedly contains hidden formatting and unwanted HTML tags, which potentially cause a variety of issues, such as:
Bad formatting
Formatting discrepancy between Editing and Published modes, for example:


You can use a function provided by Confluence to clear the formatting.
Diagnosis
Although it depends on each case, generally, you can use the "View Storage Format" function to browse the stored content to determine whether your page is affected by these unwanted HTML tags. For example:
Page storage format
1
2
3
4
5
6
7
8
9
10
<ac:layout><ac:layout-section ac:type="single"><ac:layout-cell>
<p><span class="plugin_pagetree_children_span"> <a>Item 1</a> </span></p>
<p><span class="plugin_pagetree_children_span"> <a>Item 2</a> </span></p>
<p style="text-align: left;"><span class="plugin_pagetree_children_span"> <a>Item 3</a> </span></p></ac:layout-cell></ac:layout-section><ac:layout-section ac:type="single"><ac:layout-cell>
<ul class="plugin_pagetree_children_list">
<li>
<p><span class="plugin_pagetree_children_span"> <a>Item A</a> </span></p></li>
<li>
<p><span class="plugin_pagetree_children_span"> <a>Item B</a> </span></p></li>
<li><span class="plugin_pagetree_children_span"> <a style="text-align: left;">Item C</a> </span></li></ul></ac:layout-cell></ac:layout-section></ac:layout>
In this case, the <
span>
tags were causing issues.
Solution
Clear formatting
The handy approach is "Clear formatting". This works mainly for style-wise HTML issues.
While editing the affected page, select the target elements and hit "Clear formatting".

Was this helpful?