Code Element in the Sparkforge Email Builder

By Sparkforge Support Team ·Last reviewed May 3, 2026

The Code Element lets you drop custom HTML and inline CSS into Sparkforge emails for embeds, tracking pixels, and styling that goes beyond the standard visual editor.

The Code Element is a drag-and-drop block that adds custom HTML or inline CSS to a Sparkforge email. Use it for embedded timers, tracking pixels, or layout tweaks the visual editor cannot reach.

What the Code Element is good for

  • Custom HTML and inline CSS for one-off layouts.
  • Embedding third-party widgets like timers, badges, or forms.
  • Inserting tracking pixels and analytics tags.
  • Fine-tuning spacing, color, and styling beyond the standard editor.
  • Isolating advanced customization to one section without breaking the rest.

Note: Email clients have limited and inconsistent support for custom code. Test before sending to ensure embedded content renders the way you expect.

How to add and configure the Code Element

  1. Go to Marketing → Emails → Templates in your sub-account.
  2. Open an existing template or click + New to create one.
  3. Click Add Elements (+) in the Email Builder sidebar.
  4. Drag the Code Element into the section where you want custom code.
  5. Click the element to open Edit. In the code editor box, paste or type:
    • HTML for structure (divs, tables, embeds).
    • Inline CSS for styling (colors, spacing, fonts).
  6. Click Preview to check how the custom code renders.
  7. Send a test to multiple email clients before going live.

Limits to know

JavaScript and iframes are blocked by most email clients for security reasons, so they generally will not run inside an email. Stick to HTML and inline CSS, and keep code self-contained so it does not bleed into the rest of the layout.

Frequently Asked Questions

What types of code can I add with the Code Element?
HTML and inline CSS. JavaScript and iframe content are blocked by most email clients for security reasons and should be avoided.
Will my custom code break the rest of the email layout?
It can if global styles leak. Keep code self-contained, use inline CSS rather than style blocks, and scope rules tightly.
How do I make sure my code renders across email clients?
Send test emails to Gmail, Outlook, and Apple Mail at minimum. Email clients handle HTML differently, so visual checks are critical.
Can I save and reuse a code block across templates?
Yes. Duplicate the Code Element or copy the snippet into another template to reuse the same design or tracking logic.
Why does my code look different in Outlook?
Outlook renders HTML using Word’s engine and ignores some modern CSS. Use table-based layouts and inline styles for the most reliable Outlook rendering.

Was this article helpful?