HTML Macro

This macro is available in Confluence Server and Data Center. Learn about the macros available in Confluence Cloud.

Add the HTML macro to a page to embed content from an external website.  For example you can use this macro to embed content from your company website, or a web-based tool. 

This is a legacy macro, and is often disabled by Confluence administrators for security reasons.

On this page:

Security considerations

HTML macros are disabled by default

The HTML macro will only be available if it has been enabled by an administrator. Enabling these macros can make your Confluence site vulnerable to cross-site scripting attacks.

Add this macro to your page

To add the HTML macro to a page:

  1. From the editor toolbar, choose Insert > Other Macros.
  2. Choose HTML from the Development category.
  3. Choose Insert
  4. Paste the HTML embed code from the website you want to display into the body of the macro.  

You can then publish your page to see the macro in action. 

Change the macro parameters

This macro has no parameters. 

Enabling the HTML Macro

The HTML macro is disabled by default. You'll need Confluence Administrator or System Administrator permissions to enable this macro.

(warning) Enabling these macros can make your Confluence site vulnerable to cross-site scripting attacks. You should only turn on these macros if you trust all your users not to attempt to exploit them. We strongly recommend leaving this macro disabled if you allow self-signed up or anonymous users to create content.

To enable the HTML macro:

  1. Go to > Manage apps.

  2. Select System from the drop down and search for the Confluence HTML Macros system app.
  3. Expand the listing and enable the html (html-xhtml)  module.

Other ways to add this macro

Add this macro as you type

Type followed by the start of the macro name, to see a list of macros. 

Add this macro using wiki markup

This is useful when you want to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.

Macro name: html

Macro body: Text, consisting of HTML code.

{html}<a href="http://www.atlassian.com">Click here</a> to see the <b>Atlassian</b> website.{html}



Last modified on Nov 24, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.