Skip to main content Skip to navigation

HTML removed when publishing a page

When you publish a page, SiteBuilder removes specific tags and attributes from the page's HTML automatically. This process strips non-standard or inaccessible HTML from the page, which typically occurs when copying information from other sources, such as a Microsoft Word document, to SiteBuilder.

Most editors are not affected by this and benefit from a more standards-compliant page. It may be the case, however, that you use HTML for a particular effect, which conforms to usability standards, yet it's still removed. This article lists the tags and attributes that are automatically stripped when publishing a page.

In this article:

Tags removed

  • city
  • country-region
  • date
  • font
  • notextile
  • place
  • placename
  • placetype
  • time
  • u

Attributes removed from tags

  • span: style, lang
  • h1: style
  • h2: style
  • h3: style
  • h4: style
  • h5: style
  • h6: style
  • b: style
  • i: style
  • p: style
  • strong: style
  • em: style

Move inline styles to the <style> element

As you can see from the list above, most attributes removed automatically are style attributes. Removing these, in the vast majority of cases, is done to clean up content copied from Microsoft Word – not to enforce usability requirements on editors who change the raw HTML.

To style an element, the best method is to abstract the CSS into a <style> tag and use a class on the element.

For example, SiteBuilder removes the style attribute from this paragraph on publishing:

<p style="margin-bottom: 2em;">Some text here.</p>

To achieve the desired effect, move the CSS to a <style> element and use a class:

p.extra-paragraph-spacing { margin-bottom: 2em; }

<p class="extra-paragraph-spacing">Some text here.</p>

Related articles