The Edit HTML option in the editor enables you to edit the HTML of a selected element on your page in a code console.
When selecting the element you want to edit, you can refine your selection by using the select parent/select child options.
In the code editor, the HTML content for the selected element is displayed.
You can modify it as desired: add, remove or edit HTML content.
⚡Your webpage may be based on an HTML template that loads dynamic information. Using this option will replace the former HTML with the one you have edited, for each page that matches both the targeting and the selector for your modification.
For example, if you edit the product information (title, sizes, colors and so on) of a product page, the edited HTML will be replaced for every product page that has the same targeting and selector.
As a result, many different products will have the same title, sizes, colors (depending on what you edited) when they shouldn’t.
We recommend using the Edit HTML option in the following cases:
- For static pages such as homepages, or static parts of your website such as the navigation or the footer.
- For campaigns that target a small part of your traffic, such as one language or one device, to avoid showing your visitors content that isn’t adapted to them.
There are less sensitive options, which can be used in the following use cases:
- To add new HTML to your page.
👉 Use the Add Image, Add Text or Add HTML options in the visual editor.
- To remove existing HTML from your page.
👉 Use the Hide Element, Hide the content of the element options in the visual editor.
- To edit existing HTML on your page.
👉 Use the Edit Style, Edit Text, Edit Link, Edit Attributes, Replace Image options in the visual editor.
It is preferred to have several editions through other options rather than using the Edit HTML option in terms of performance (regarding tag weight and your website's rendering), to protect your website’s functionalities and guarantee templates with correct content.
⭐ Good to know
In any case, don’t forget to QA your campaign for several pages of your website, on different devices and browsers (especially if your campaign should be displayed cross devices), in different environments (e.g.: logged in/not logged in) to make sure you have covered all possible scenarios.