---
name: html-email-template-generator
description: "Responsive, client-safe HTML for a marketing or transactional email: table-based layout, inlined CSS, a bulletproof button, dark-mode and Outlook fallbacks, and the alt text and unsubscribe details that keep it out of spam, ready to paste into any sender. Use when an email campaign or transactional message needs responsive HTML that renders in Gmail, Outlook, and Apple Mail and can be pasted into a sending platform. Do not use for writing the email copy or subject line, or building web pages. Related topics: coding, email, marketing."
---

# HTML Email Template Generator

Responsive, client-safe HTML for a marketing or transactional email: table-based layout, inlined CSS, a bulletproof button, dark-mode and Outlook fallbacks, and the alt text and unsubscribe details that keep it out of spam, ready to paste into any sender.

## When to use

Use this skill when an email campaign or transactional message needs responsive HTML that renders in Gmail, Outlook, and Apple Mail and can be pasted into a sending platform. Do not use it for writing the email copy or subject line, or building web pages.

## Workflow

1. Ask the user for each input listed below in a single message, skipping any they have already given. Where options are listed, offer them, but accept other answers too.
2. Build the layout with nested presentation tables and a 600px container that collapses to full width under a media query.
3. Construct the button as a padded table cell with an Outlook conditional and a plain text link beside it for image-blocking clients.
4. Inline every style when the toggle is on, keeping only the media query and dark-mode overrides in a style block.
5. Insert the platform's merge tags for unsubscribe and recipient name, alt text on every image, and a preheader when selected.
6. Return the complete HTML in one block with a note naming the clients that most need a visual check.

## Inputs

- **Type of email** (choose one: Newsletter, Welcome Email, Password Reset, Receipt/Invoice, Promo Offer, Abandoned Cart)
- **Primary brand colour** (free text, e.g. "Hex value e.g. #FF5733")
- **Font preference** (free text, e.g. "Arial or Helvetica with a web font fallback")
- **Main copy** (longer free text)
- **Call to action link** (free text, e.g. "The URL the button goes to")
- **Layout style** (choose one: Single Column (Mobile First), Two Columns, Image Heavy)
- **Elements to include** (choose any: Header Image, CTA Button, Social Media Icons, Unsubscribe Footer, Preheader Text, Order Summary Table)
- **Inline the CSS** (choose one: Yes, No)
- **Sending platform** (choose one: Mailchimp, SendGrid, Klaviyo, Postmark, Custom SMTP, Other)

## Output

One fenced HTML block containing the full email, followed by a three-line note on which clients to preview and why.

## Prompt template

Fill the inputs into this template and follow it as the full instruction.

### HTML Email Template Generator

Build the HTML for an email that renders correctly in the clients that matter.

#### Email purpose
- Type of email: {{Type of email}}
- Primary brand colour: {{Primary brand colour}}
- Font preference: {{Font preference}}
- Main copy: {{Main copy}}
- Call to action link: {{Call to action link}}

#### Layout
- Layout style: {{Layout style}}
- Elements to include: {{Elements to include}}
- Inline the CSS: {{Inline the CSS}}
- Sending platform: {{Sending platform}}

Use nested tables with role="presentation" for the layout, a 600px container that collapses to full width under a max-width media query, and bulletproof buttons built from a table cell with padding rather than a styled anchor alone. Inline every style when the toggle is on and keep a small style block for the media query and dark-mode overrides, which cannot be inlined. Add Outlook conditionals for the container width and the button, alt text on every image, a preheader when selected, and a text link alongside each button for clients that block images. Use the platform's merge tags for the unsubscribe link and recipient name, written in the platform's own syntax. Keep transactional types free of marketing blocks. Return the complete HTML in one fenced block with a short note on the three clients most likely to need a visual check.

## Pitfalls

- Using flexbox or CSS grid for the layout, which Outlook and older Gmail apps ignore entirely.
- Relying on a background image for the hero, which most clients block by default so the headline disappears.
- Putting marketing blocks or tracking pixels in a transactional email, which can breach consent rules and hurt deliverability.
