How do I add HTML to a page on Confluence?
Asked by Rajeev Desai:

Hi,

I'd like to add HTML code to a page on Confluence. Are iframes a good macro to use? I was also looking at code snippet but it could be just a visual tool and not embedding it into the page.

Thanks.

Regards,

Rajeev


Answers:
author: Patricia Modispacher _appanvil_
body: The question is a bit older, but the need is the same: Currently there is**no Confluence built in macro** for the cloud that allows you to embed HTML into your page. But there is the macro suite [**Aura Content Formatting Macros. ?**](https://marketplace.atlassian.com/apps/1221974?utm_campaign=community_question_html_confluence&utm_source=atlassian-community&utm_medium=social)

Using Aura, you can embed **HTML, CSS and JavaScript** completely intuitively and quickly - previews are displayed in **real time. ?**

[![image-20220329-203842.png](https://community.atlassian.com/t5/image/serverpage/image-id/320622iB62192979F4B5513/image-size/large?v=v2&px=999 "image-20220329-203842.png")](https://marketplace.atlassian.com/apps/1221974?utm_campaign=community_question_html_confluence&utm_source=atlassian-community&utm_medium=social)

Another advantage of [**Aura**](https://marketplace.atlassian.com/apps/1221974?utm_campaign=community_question_html_confluence&utm_source=atlassian-community&utm_medium=social) for you is that Aura is not just the one HTML macro, but a whole macro suite that provides you with a wealth of tools to elevate your Confluence pages. From dynamic content and status macros to cards, panels, colors, tabs, titles, and much more, Aura empowers you to create truly **exceptional Confluence experiences.**

**[You can try it for free! ?](https://marketplace.atlassian.com/apps/1221974?utm_campaign=community_question_html_confluence&utm_source=atlassian-community&utm_medium=social)**


author: Dominic Lagger
body: Hi [@Rajeev Desai](/t5/user/viewprofilepage/user-id/4973619)

Confluence Cloud allows users to insert HTML code using the HTML macro. The HTML macro is not enabled by default, so you'll need to have your Confluence administrator enable it first.

Once the HTML macro is enabled, you can add it to a Confluence page by doing the following:

1. Go to the page where you want to insert the HTML code.
2. Click on the "Insert more content" button (+ icon) in the toolbar.
3. Select "Other macros" from the dropdown menu.
4. Type "HTML" into the search bar and select the "HTML" macro.
5. Insert your HTML code into the macro editor.

Regarding iframes, they can be used to embed external content, such as videos or maps, into a Confluence page. However, it's important to note that some external content providers may not allow their content to be embedded using iframes. Additionally, iframes can potentially pose a security risk, so it's important to only use trusted sources.

The code snippet macro is another option for adding HTML code to a Confluence page. It allows you to display code snippets with syntax highlighting, but it doesn't actually execute the code. If you're looking to embed external content or execute custom code on your Confluence page, the HTML macro may be more suitable.

Regards, Dominic

comments: author: Trudy Claspill
body: [@Dominic Lagger](/t5/user/viewprofilepage/user-id/601600)

The built-in HTML macro that was available in Confluence Server/DC is not available in Confluence Cloud. Alternate macros have to be used to insert HTML code.

[@Rajeev Desai](/t5/user/viewprofilepage/user-id/4973619)

Which alternate macro is best for you depends on the varieties of HTML code you might want to insert.


author: Greg Wenden
body: I'm looking to add the Google Analytics script to my Confluence pages. There are, older, websites giving instructions as to how to do this, but they don't seem to be applicable now.

How do I embed the script into the page rather than adding it as content?


author: Trudy Claspill
body: Hello [@Greg Wenden](/t5/user/viewprofilepage/user-id/4369304)

Your question is not the same topic as the original post. Please start a new Question and provide information about your environment (i.e. hosting type, plan/version).


Tags: atl-gruland

cloud

confluence-cloud