Sub topic 10
Build a reliable CTA button in HTML email
This chapter assumes you can read basic HTML and know how your email service provider (ESP) lets you edit HTML. The goal is a button that looks the same in most inboxes, can be tapped, and sends clicks you can attribute to your goal.
Why not a normal button
Email clients strip or ignore much of the CSS that web browsers support. Many remove <style> blocks, <button> and <form> elements, and JavaScript. Some versions of desktop Outlook render with the Microsoft Word engine, which ignores parts of the box model. So the reliable approach is a link styled to look like a button, placed inside a table.
The pattern
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" bgcolor="#1a56db" style="border-radius:6px;">
<a href="https://example.com/trial?utm_source=newsletter&utm_medium=email&utm_campaign=trial_launch"
style="display:inline-block;padding:14px 28px;font-family:Arial,sans-serif;font-size:16px;font-weight:bold;color:#ffffff;text-decoration:none;border-radius:6px;">Start your free trial</a>
</td>
</tr>
</table>Each part has a job:
role="presentation"tells screen readers the table is layout, not data.bgcoloron the cell sets the colour with an HTML attribute. Clients that drop CSS backgrounds still honour it.- Padding on the link makes the tappable area larger than the text. Aim for at least 44 px of height, which the 14 px padding plus 16 px text roughly gives you.
- Inline styles survive where
<style>blocks do not. Setfont-family,color, andtext-decorationon the link itself, because some clients override default link colours. - System fonts such as Arial avoid a fallback that changes the button's size.
Tie the link to your goal
The utm_ parameters are what connect a click to the metric in your brief. In HTML, write the & between parameters as &. Keep the same destination and parameters on every instance of the button. If you repeat the CTA lower in the email, only the text and URL must match. Add a utm_content value, such as top or bottom, only if you want to compare placements. Never reuse one campaign name across different goals.
Common errors
| Problem | Cause | Fix |
|---|---|---|
| Only the text is clickable in Outlook | The Word engine often ignores padding on an inline link | Test in Outlook. If it matters, use a VML "bulletproof" button for that client, or put padding on the cell and accept a text-sized click target |
| Square corners in some clients | `border-radius` is not supported | Treat rounding as a bonus. The button must still work square |
| Button is invisible with images off | The button was an image | Use text and `bgcolor`, never a picture of a button |
| White text on a white background | The client dropped the background colour | Use a dark `bgcolor` and check dark mode |
| Link colour changes to blue | Client default link styles override yours | Set `color` inline on the `<a>` |
Check before sending
- Send a test to at least one webmail client, one mobile client, and desktop Outlook if your list uses it.
- View the test with images off.
- Check dark mode for contrast.
- Click the button and confirm the destination and the parameters in your analytics.
- Confirm the button's text matches the CTA in your brief.
Exercise
A subscriber reports that in desktop Outlook your button shows only a small blue underlined text link, with no coloured block. The button works in Gmail. Name two likely causes and one fix.
Show answer
Likely causes: the styling relies on CSS padding and background on the link, which the Outlook Word engine often ignores, and the background colour is set only in CSS and not as bgcolor on the table cell. Fix: put bgcolor on the td, keep the colour and font styles inline on the link, and if that client matters to your list, add a VML bulletproof button wrapped in an Outlook-only conditional comment. Then retest in Outlook.