The Code Element lets you add your own HTML or CSS snippets to your email templates. This gives you full creative control beyond the standard design options. It's ideal for embedding widgets, adding tracking pixels or using advanced styling to improve how your emails look and work.
What is the Code Element in the Email Builder?
The Code Element is a drag-and-drop block. It lets you add custom HTML or CSS straight into your email layout. It's designed for advanced users who want to include specialised content that isn't possible in the standard visual editor. Examples include embedded countdown timers, tracking tags or layout changes.
When used correctly, it allows deeper customisation. It also helps you bring third-party tools into your email design smoothly.
Note: Email clients have limited support for custom code. Always test your email before sending to make sure all embedded content displays correctly across platforms.
Key benefits of the Code Element
Using the Code Element in your email design has several advantages:
Add custom HTML or CSS for unique layouts and designs.
Embed third-party widgets such as timers, forms or badges.
Insert tracking pixels or analytics scripts for campaign insights.
Fine-tune spacing, colours and styles beyond what the standard editor allows.
Experiment safely with advanced customisation in specific sections of your email.
How to set up the Code Element
Follow these steps to add and configure the Code Element in your email template:
Go to Marketing → Emails → Templates in your account.
Open an existing email template, or create a new one by clicking the + New button.
In the Email Builder, click the Add Elements (+) icon in the left sidebar.
Find the Code Element under the Elements section.
Drag and drop the Code Element into the section of the email layout where you want it.
Click the Code Element to open the Edit tab in the left panel.
In the code editor box, paste or type your custom HTML or CSS code.
Click Preview to check how your custom code looks in the design.
Test your email in both desktop and mobile previews before sending to make sure it displays properly.
Frequently Asked Questions
Q: What types of code can I add using the Code Element?
You can add HTML and inline CSS. JavaScript and iframe content generally aren't supported by most email clients for security reasons.
Q: Will my custom code affect the rest of the email layout?
It can if it isn't written correctly. Keep your code self-contained and use inline styles so it doesn't affect other elements.
Q: How can I make sure my code displays properly across email clients?
Always test your email using the preview and send test options. Email clients handle HTML differently, so some code may look slightly different in each one.
Q: Can I save and reuse my custom code?
Yes. Once you've created a code block, you can duplicate it or copy it across templates to reuse the same design or functionality.




