All Collections
Building Emails & Landing Pages
Adding Custom HTML to the Editor
Adding Custom HTML to the Editor

How to import custom HTML in the Email Builder

Jack Steele avatar
Written by Jack Steele
Updated over a week ago

Knak’s mission is to empower our customers to build their assets in a no code environment, as such we removed the custom html block. If you’re struggling to build something please reach out to your CSM or our support team and we can advise you on the best path forward and/or help reenable this feature

Why use Custom HTML?

The flexibility of the Builder means you can achieve the vast majority of layouts without writing any custom code. But if you do have a particularly bespoke element that you want to use in an email you can add HTML as a content section in the builder.

We would recommend using the structure blocks to create your layout in most cases within the Builder. The cases where you might want to use custom HTML should be used cautiously and fit within the layout of the builder. A small mistake could negatively impact the layout of your entire email, so proceed with caution.

Examples of custom HTML: 

Add HTML 5 video, anchor links, etc.

You can now add content that is not available as a standard content element in the editor (HTML 5 video, anchor links, etc.). 

Add advanced effects with CSS

Get creative with animations! Animation effects are not widely supported by the email clients, but managed correctly they can help drive engagement. 

Add live content from external providers

Product recommendations, dynamic ads, personalized maps, countdowns… all of this advanced content can be made possible with the right custom HTML.

How to Add Custom HTML to the Builder:

To add your code just drag an HTML content element into your message. It can be positioned alone, with other HTML content items, or mixed with other types of content:

Once you have inserted the HTML content element into your email or landing page, click on it. You will see a box appear in the right nav menu in which you can enter your code.

HTML tags allowed in the Builder:

The HTML content will automatically correct some issues like HTML tags that are left open, and strip out code that cannot be used, such as script tags or iframe tags (these code tags are not allowed by the major part of email clients, can cause deliverability problems or security risks for the editor an the applications that runs it).

Allowed Tags List:

a, abbr, acronym, address, area, b, bdo, big, blockquote, button, caption, center, cite, code, colgroup, dd, del, dfn, dir, div, dl, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, i, ins, kbd, label, legend, li, map, menu, ol, optgroup, option, p, pre, q, s, samp, select, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, u, tr, tt, u, ul, var 

Allowed Attributes List:

general attributes: style, id, class, data-*, title 

a: href, name, target 

img: align, alt, border height, hspace, src, vspace, width, usemap 

table: align, bgcolor, border, cellpadding, cellspacing, width 

tbody: align, valign 

td: align, bgcolor, colspan, height, rowspan, valign, width 

tr: align, bgcolor, valign 

tfoot: align, valign 

th: align, bicolor, colspan, height, rowspan, valign, width 

thead: align, valign 

li: type 

map: name 

area: alt, coords, href, shape, target 

Adding CSS
Gmail will automatically strip any CSS that isn't in the email head, meaning any CSS that's added in a html block won't be supported. 

Enjoy using custom HTML with care and make sure you test thoroughly across different email clients.

Need more help? Contact support via live chat within Knak using the chat bubble in the bottom right corner or email support@knak.com

Did this answer your question?