Advice firms Small businesses Branding Email marketing Local SEO Get found by AI Packages Portfolio Blog & Guides Free tools Get in touch →
← Back to blog
· 5 min read

How to edit an HTML email template without breaking it

A good HTML email looks intimidating when you open the file — walls of angle brackets and tables. But editing one is far simpler than it looks. With a properly marked-up template you only ever touch a handful of clearly-labelled spots, and leave the scary scaffolding alone. Here's the whole process, start to finish.

This guide assumes you've got a template with edit markers built in — little plain-English comments that tell you exactly what to change. All three of my free LiamMail templates work this way, and so does every custom suite I build. If your template doesn't have markers, the same principles apply; you'll just have to hunt a little harder for your text.

Step 1 — Open it in the right thing

An .html file is just text. Open it in a plain text editor: Notepad on Windows, TextEdit on Mac (switch it to plain-text mode first), or a free editor like VS Code if you want it colour-coded and easier to read.

⚠️ One rule
  • Don't open it in Word or Google Docs. They quietly add formatting that corrupts the code. Plain text editors only — they leave the file exactly as it is.

Step 2 — Look for the markers

Scroll through and you'll see comments like these. Anything inside <!-- ... --> is a note to you — it never shows up in the actual email. The markers point at the exact bit to change:

<!-- ✏️ EDIT: Your headline goes here -->
<h1>Welcome aboard, friend.</h1>

<!-- ✏️ EDIT: Your body text — keep it short & warm -->
<p>Thanks for joining us. Here's what to expect…</p>

You change only the words between the tags — the bit shown in yellow above. The <h1> and <p> around them stay put; they're what makes the heading look like a heading.

Step 3 — Swap your text, images and links

There are really only three kinds of edit you'll ever make:

The only three edits you need
  • Text. Replace the words between the tags. That's headings, paragraphs, captions and sign-offs.
  • Images. Find the src="…" link and point it at your own image's web address. Update the alt="…" too — that's the description shown if the image doesn't load.
  • Links & buttons. Change both the visible button text and the href="…" link it points to. It's easy to update one and forget the other.

Anything marked ⛔ DON'T CHANGE is layout — the tables and spacing that keep the email from falling apart in Outlook. Leave those exactly as they are and you can't go wrong.

"Change the words between the markers, leave the scaffolding alone. That's the whole skill."

Step 4 — Add, duplicate or remove whole sections

The best templates are built in blocks — self-contained chunks like a story, a product or a button that you can repeat or remove. The newsletter template, for example, has "story blocks" you can stack as many times as you need. Each one is wrapped in a matching pair of comment markers, so you can see exactly where it starts and ends:

<!-- ════ STORY BLOCK (copy this whole block to add another) ════ -->
<tr>
  ... the heading, image and text for one story ...
</tr>
<!-- ════ /STORY BLOCK ════ -->

To add another section, select everything from the opening <!-- STORY BLOCK --> marker down to the closing <!-- /STORY BLOCK --> marker — both comment lines included — copy it, and paste it directly underneath. You now have two identical blocks; edit the words and images in the new one exactly as before.

To remove a section, delete everything between (and including) those same two markers. The block disappears cleanly and the rest of the email closes up around it.

The golden rule of moving blocks
  • Always grab the whole block. Copy from the opening marker to the closing marker, both comment lines included. Each block is a complete table row (<tr>…</tr>) — take half of it and the layout breaks.
  • One change at a time. Duplicate or delete one block, save, send yourself a test, then do the next. A single change is far easier to undo if something looks off.
  • No markers? Use the row. If a section isn't wrapped in START/END comments, it still sits between a <tr> and its matching </tr> — that pair is one block.

Not everything is modular — a simple welcome email is usually one fixed layout — but wherever you see paired block markers, that's your licence to add and remove as much as you like.

Step 5 — Get the unsubscribe link right (this one's the law)

Of all the links in the email, one is non-negotiable: the unsubscribe link. In the UK, every marketing email is legally required to give people an easy way to opt out (under PECR and UK GDPR) — and beyond the law, a missing or broken unsubscribe is one of the fastest ways to get marked as spam, which wrecks your delivery to everyone else.

In a good template you'll see a placeholder like href="{{unsubscribe}}" in the footer. That {{unsubscribe}} isn't a real link yet — it's a merge tag your email platform swaps for a proper, personalised unsubscribe link when it sends. The catch is that every platform uses a different tag:

⚠️ Replace the placeholder with your platform's tag
  • Mailchimp: *|UNSUB|*
  • Klaviyo: {% unsubscribe %}
  • Brevo: {{ unsubscribe }}
  • Anything else: search your platform's help docs for "unsubscribe merge tag" or "unsubscribe link" — they all have one.

Two rules: never delete the unsubscribe line, and always send yourself a test and actually click it before the email goes to your list. While you're down there, make sure your real business name and a genuine postal address are in the footer too — that's also a legal requirement for marketing email.

Step 6 — Make a plain-text version

Every email actually has two versions: the designed HTML one, and a plain-text fallback. Some inboxes, smartwatches and privacy-focused apps show the plain-text one — and a missing or messy plain-text version can quietly hurt your deliverability.

Rather than let your platform auto-generate a rough one, paste your copy into my free Plain Text Email Generator. It gives you a clean, properly spaced text version you can drop straight in. It's one of ten free tools in the email campaign toolbox.

Step 7 — Paste it into your email platform

Now you send it. Every major platform has a "paste in your own HTML" route — you don't rebuild the email in their editor, you just drop in the file you've edited:

Where to paste the code
  • Mailchimp: Create → Email → choose the Code your ownPaste in code template, then paste the whole file.
  • Klaviyo: New campaign → at the template step pick Code editor (or import HTML), then paste.
  • Brevo / others: Look for a "code editor", "paste HTML", or "import HTML" option when choosing a template.

Copy everything from the file — from the very first line to the very last — not just the visible text. Then send yourself a test and open it on your phone as well as your computer before it goes anywhere near your list. If something looks off, undo your last change and test again; you've almost certainly nudged a tag you didn't mean to.

Before you hit send: are you allowed to email them?

A perfect template sent to the wrong list is still a problem. Before anything goes out, be clear on why you're allowed to email each person. In the UK this comes down to two buckets:

⚖️ Consent vs operational
  • Marketing emails (newsletters, offers, "we miss you") should only go to people who opted in — or to existing customers under the narrow PECR "soft opt-in", where they bought something similar and were given a clear chance to opt out. Don't email bought lists or scraped addresses.
  • Operational / transactional emails (order confirmations, booking reminders, account or service notices) aren't marketing, so they don't need marketing consent — but keep them genuinely operational. The moment you slip a promotion into a receipt, it becomes marketing and the consent rules apply.

If you're honestly not sure your list is clean — addresses collected without clear consent, no record of who opted in, a pile of contacts you've "always had" — it's worth sorting before you press send, not after a complaint. That's exactly what my email list health & GDPR check is for: reviewing how addresses were collected, fixing consent and unsubscribe handling, and cleaning the list so what you send is both legal and more likely to land. There's a fuller primer in the GDPR & email lists guide too.

I'm a designer, not a lawyer or your compliance officer — this is general guidance, not legal advice. For the detail, the UK ICO's direct-marketing guidance is the authority.

That's it

Open in a plain editor, change the marked bits, copy or delete whole blocks to resize the email, set your unsubscribe tag, generate the plain-text version, paste into your platform, send a test. Do it once and the next one takes five minutes. Grab the three free templates here and try it on a real one.

When you'd rather not

Editing a template is genuinely easy once it's built well — but building one that's bulletproof across Outlook, Gmail and Apple Mail, in your brand, with your fonts and colours baked in, is the fiddly part. That's the bit I do for you. If you'd like a proper set of editable templates designed around your brand instead of mine, that's the custom email template service. You still get the easy-edit markers — they're just wrapped around your own look.

Want templates in your own brand?
I'll build a set of bulletproof, on-brand email templates you can edit yourself in minutes — welcome emails, newsletters, the lot. Tested across every major inbox.
See the template service →