
Setting up a Confluence HTML Macro is a straightforward process.
To begin, you'll need to navigate to your Confluence space and click on the "Add" button.
This will open a new page where you can select the "HTML Macro" option from the list of available macros.
You can then configure the macro settings, such as specifying the URL of the HTML content you want to embed.
On a similar theme: Confluence Embed Html
Confluence HTML Macro Basics
Confluence HTML macros are disabled by default, so you'll need to enable them to use them.
There are many HTML macros available in Confluence, with over 50 to choose from.
Some examples of HTML macros include the HTML Include Macro and the HTML Macro.
HTML macros can be used to include HTML content in your Confluence pages.
The HTML Include Macro has no parameters, making it easy to use.
Here are some examples of HTML macros:
- HTML Include Macro
- HTML Macro
- Office Excel Macro
- Office PowerPoint Macro
- Office Word Macro
These macros can be used to add a variety of content to your Confluence pages.
The HTML Include Macro is a good choice for including external HTML content in your pages.
The HTML Macro is a more general-purpose macro that can be used for a variety of HTML-related tasks.
Recommended read: Is Html Used to Create Web Pages
Security and Whitelisting
The HTML macro in Confluence is only available if an administrator has enabled it, which can make your site vulnerable to cross-site scripting attacks.
By default, HTML macros are disabled to prevent security risks, but enabling them can still pose a threat if not managed properly.
To use the HTML macro in Confluence Cloud without compromising on security, you can define a trusted domain allowlist to restrict users to only interact with trusted sources.
Enabling the HTML macro can make your Confluence site vulnerable to cross-site scripting attacks, so it's essential to weigh the benefits against the potential risks.
With domain whitelisting, you can control which domains are allowed to be embedded and interacted with, helping to prevent security breaches.
Consider reading: Html Prevent Copy Paste
Adding and Enabling Macros
To add the HTML macro to a page, you need to follow these steps: From the editor toolbar, select Insert, then Other Macros. Choose HTML from the Development category and then choose Insert. Next, paste the HTML embed code from the website you want to display into the body of the macro.
You can also add the HTML macro using wiki markup, which 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. The macro name is "html" and the macro body is text consisting of HTML code.
To enable the HTML macro, you need to have Confluence Administrator or System Administrator permissions. Enabling the macro can make your Confluence site vulnerable to cross-site scripting attacks, so it's recommended to only turn it on if you trust all your users not to attempt to exploit it.
Expand your knowledge: How to Create a Website Html Css
Add to Page
To add a macro to your page, you can use the Insert function from the editor toolbar. Select Insert, then Other Macros, and choose HTML from the Development category.
You can also upload complex HTML files as attachments and render them seamlessly in Confluence page, making it easy to display HTML files, tables, and forms.

To add the HTML macro using wiki markup, you'll need to use the macro name "html" and the macro body will consist of Text, consisting of HTML code.
Here are the steps to add the HTML macro:
- From the editor toolbar, select Insert, then Other Macros.
- Choose HTML from the Development category.
- Choose Insert
- Paste the HTML embed code from the website you want to display into the body of the macro.
Alternatively, you can upload HTML files as attachments and render them in your Confluence page.
Enabling the Macro
To enable the HTML macro, you'll need Confluence Administrator or System Administrator permissions. This is because enabling the macro can make your Confluence site vulnerable to cross-site scripting attacks.
You should only turn on the HTML macro if you trust all your users not to attempt to exploit it. If you allow self-signed up or anonymous users to create content, it's strongly recommended to leave this macro disabled.
To enable the HTML macro, go to the Administration menu and select Manage apps. From there, select System from the dropdown and search for the Confluence HTML Macros system app. Expand the listing and enable the html (html-xhtml) module.
For more insights, see: Copy Html Site

Alternatively, you can also enable the HTML macro by going to > Add-ons, selecting System from the dropdown, and searching for the Confluence HTML Macros add-on. Expand the add-on and enable the html (html-xhtml) module.
Here's a step-by-step guide to enable the HTML macro:
Macro Functionality
Confluence offers a wide range of macro functionalities that can be used to enhance content and improve collaboration.
The Activity Stream Macro allows you to display a feed of recent activity on a page or space. This can be a great way to keep team members informed about what's happening.
Confluence has a dedicated macro for displaying JIRA Issues, making it easy to incorporate project management data into your content. You can also use the JUnit Report Macro to display test results.
The Chart Macro is a powerful tool for creating visualizations of data. It can be used to display charts, graphs, and other types of visualizations.
For more insights, see: The Html Canvas Element Is Used to
Confluence also offers a range of macros for working with multimedia content, including the Gallery Macro and the Multimedia Macro. These can be used to display images, videos, and other types of multimedia content.
You can use the Page Properties Macro to display information about a page, such as its creation date and author. The Page Properties Report Macro can be used to display a summary of page properties.
Here are some of the most commonly used Confluence macros:
- Activity Stream Macro
- JIRA Issues Macro
- Chart Macro
- Gallery Macro
- Page Properties Macro
- Page Properties Report Macro
The Table of Contents Macro can be used to create a table of contents for a page, making it easier for readers to navigate. The Table of Content Zone Macro can be used to create a table of contents for a specific section of a page.
Confluence's macro functionality is incredibly flexible, allowing you to customize and extend its capabilities to suit your needs.
For another approach, see: Is Html Still Used
Advanced Macro Options
The Confluence HTML Macro offers advanced macro options that can be used to customize and enhance your content.
You can use the "Link to a Confluence Page" option to link to a specific Confluence page. This is useful for creating a table of contents or linking to related content.
The "Include Content" option allows you to insert content from another Confluence page into your page. This is similar to copying and pasting, but it's more efficient and easier to manage.
You can use the "Include Content" option to insert a table of contents, a list of pages, or even a search bar. This adds a lot of functionality to your page without requiring you to create it from scratch.
The "Include Content" option is also useful for inserting content from a different space or even a different Confluence instance. This makes it easy to share content across different teams or projects.
By using the "Include Content" option, you can create a page that's connected to other related content. This makes it easier for users to find what they're looking for and navigate through your content.
Intriguing read: Html Include
Content Creation with Macros
You can bring data to life by transforming XML into sophisticated HTML, XHTML, or wiki markup via XSLT scripting to create engaging and informative content layouts.
With over 40 macros available, you're fully equipped to create complex content layouts. Macros can be used to display tables, forms, and other HTML elements seamlessly in a Confluence page.
Here's a list of some of the available macros:
- Activity Stream Macro
- Attachments Macro
- Blog Posts Macro
- Chart Macro
- Children Display Macro
- Code Block Macro
- Column Macro
- Content by Label Macro
- Content by User Macro
- Content Report Table Macro
- Contributors Macro
- Contributors Summary Macro
- Gallery Macro
- JIRA Issues Macro
- JUnit Report Macro
- Livesearch Macro
- Multimedia Macro
- Navigation Map Macro
- Office Excel Macro
- Office PowerPoint Macro
- Office Word Macro
- Page Index Macro
- Page Properties Macro
- Page Tree Macro
- PDF Macro
- Recently Updated Dashboard Macro
- Recently Updated Macro
- Related Labels Macro
- Roadmap Planner Macro
- RSS Feed Macro
- Search Results Macro
- Status Macro
- Table of Contents Macro
- User List Macro
- User Profile Macro
- Widget Connector Macro
Return revised heading
You can upload complex HTML files as attachments and render them seamlessly in Confluence pages. This is a game-changer for displaying tables, forms, or other HTML content in a page.
The possibilities are endless with the HTML from Page Attachments feature. You can upload any HTML file and it will be rendered perfectly in your Confluence page.
Macros are another powerful tool for content creation in Confluence. There are over 50 different macros to choose from, each with its own unique functionality.
Some examples of macros include the Activity Stream Macro, which displays a list of recent activity on your space, and the Chart Macro, which allows you to create custom charts and graphs.
Here are some of the most popular macros:
- Activity Stream Macro
- Chart Macro
- Gallery Macro
- JIRA Issues Macro
- Table of Contents Macro
These macros can be used to enhance your content and make it more engaging and interactive.
Simple Rich Content Creation

Creating rich content doesn't have to be complicated. You can bring data to life by transforming XML into sophisticated HTML, XHTML, or wiki markup via XSLT scripting to create engaging and informative content layouts.
This is especially useful when you need to present complex information in a clear and concise manner. By using XSLT scripting, you can make data more accessible and easier to understand.
To add HTML to your page, you can use a macro. From the editor toolbar, select Insert, then Other Macros, and choose HTML from the Development category.
Once you've selected the HTML macro, you can paste the HTML embed code from the website you want to display into the body of the macro. This is a simple and straightforward process that can be completed in just a few steps.
After pasting the code, you can publish your page to see the macro in action. This will allow you to see how the HTML will appear on your page and make any necessary adjustments.
Here's a step-by-step guide to adding an HTML macro to your page:
- From the editor toolbar, select Insert, then Other Macros.
- Choose HTML from the Development category.
- Choose Insert
- Paste the HTML embed code from the website you want to display into the body of the macro.
Frequently Asked Questions
How to create a macro in HTML?
To create a macro in HTML, press Control+Return to add a new row and enter a macro name, then edit its replacement text. Alternatively, edit an existing macro in a table to modify its settings.
What is the better code macro for Confluence?
The Better Code macro for Confluence is an enhanced version of the default Code Block macro, offering improved features and compatibility with a wider range of programming languages. It automatically detects the language and markup, making it a convenient and efficient coding solution.
Featured Images: pexels.com
