49-html-email-template-global
Use when responsive HTML email has to render correctly in every client — table-based structure, inline CSS, 600px max width, dark mode handling, quirks for Gmail, Apple Mail, Outlook and Yahoo, bulletproof buttons, and a pre-send test checklist, shipping a self-contained .html file to paste into Klaviyo, Mailchimp, HubSpot, or Brevo. Trigger on 'HTML email', 'code an email template', 'responsive email', 'why does my email break in Outlook', 'email dark mode is broken', 'the newsletter looks wrong on mobile'. Not for — sequence strategy and subject lines, see `14-email-marketing-global`; a web page, see `12-landing-page-brief-global`; brand colors and fonts, see `46-brand-guideline-global`.
git clone --depth 1 https://github.com/minhnv0807/ai-business-skills /tmp/49-html-email-template-global && cp -r /tmp/49-html-email-template-global/skills/en/49-html-email-template-global ~/.claude/skills/49-html-email-template-globalSKILL.md
# HTML Email Template (Global)
Email HTML is not web HTML: it needs table layout, inline CSS, and avoidance of everything clients do not support. The bar is simple — it looks right in Gmail, Apple Mail, Outlook, and Yahoo, and it reads on a 375px phone. No exceptions. Content and sequence come from `14-email-marketing-global`; this skill handles the code.
## Information gathering
Read the brand guideline (`46-brand-guideline-global`) and the email content from `14-email-marketing-global` if available. If information is missing, ask up to 4 questions:
1. **Email type and layout?** Welcome, broadcast, nurture, offer, or transactional — single column, two columns with a product image, or a multi-section newsletter?
2. **Which sections?** Header, hero, body, social proof, CTA, footer — is there a hero image?
3. **Is the copy written?** Or should the template ship with placeholders? Where does the primary CTA link?
4. **Which ESP sends it?** Klaviyo, Mailchimp, HubSpot, Brevo, Braze, or other — merge tag syntax differs per platform.
## Principles
1. **Table layout only — no div/flexbox/grid/float/position:absolute.** Outlook on Windows renders through the Word engine and does not support them.
2. **Inline all CSS.** Gmail can strip `<style>` blocks; keep only media queries and dark-mode rules in `<style>`, and inline everything else.
3. **600px maximum width**, degrading to 375px.
4. **System-font fallbacks:** '[body font]', Arial, Helvetica, sans-serif. Never depend on a web font — many clients will not load it.
5. **Every `img` needs alt text plus width and height attributes** so a blocked-image inbox still reads correctly.
6. **Unsubscribe link and a physical postal address are legally required** (CAN-SPAM in the US, GDPR and PECR in the EU/UK, CASL in Canada). Honor opt-outs promptly.
7. **Test on mobile first.** The majority of opens are on a phone.
8. **One self-contained .html file, under 100KB** — Gmail clips messages past roughly 102KB.
## Workflow
### 1. Choose the layout
| Layout | Use for |
|--------|---------|
| Single column | Broadcast, nurture — most readable, fewest rendering bugs |
| Two column (image + text) | Offer emails with a product image |
| Multi-section newsletter | Digest, updates — one table block per section |
### 2. Build to the technical spec
```
Container: 600px desktop / 100% mobile
Outer background: light neutral (e.g. #F4F4F4)
Body background: [background color] (usually white)
Font: '[body font]', Arial, Helvetica, sans-serif
Body font-size: 16px / line-height: 1.6
Mobile breakpoint: max-width 480px
```
Design tokens come from the brand guideline:
- Header: ground [primary color], reversed logo, padding 20px.
- Hero: ground [primary color] or a gradient from [primary color] to [secondary color]; headline bold 28px in a light fill; subtext 16px; CTA button.
- Body: light ground, padding 40x48px desktop / 24x20px mobile; H2 bold 22px in [strong text color]; body 16px, line-height 1.7.
- CTA button: ground [primary color], bold 16px light text, padding 14x32px, radius 8px, `display:inline-block`, no underline. Outlook Windows will not draw `border-radius` — accept the square fallback, and never use an image as the button.
- Social proof: quote on [light background color], 4px left border in [primary color], attributed name and role.
- Footer: light neutral ground, 13px [muted text color] — small logo around 80px, website and social links, postal address, unsubscribe, copyright.
### 3. Fill the sections
- Header: logo, centered.
- Hero: optional preheader text, headline (max 60 characters), subtext (max 100 characters), CTA button, optional hero image 600x300 with alt text.
- Body: greeting with a merge tag, 2-3 opening sentences, main content in short paragraphs (max four sentences), bulleted content built as table rows rather than `ul` for safer rendering, optional secondary CTA.
- Footer (mandatory): company postal address, unsubscribe line ("You are receiving this because you signed up at [website] | Unsubscribe"), copyright.
### 4. Handle mobile and dark mode
```css
@media only screen and (max-width: 480px) {
/* container: 100% width */
/* body font: 15px */
/* CTA: full width, centered */
/* padding: 24px 20px */
/* images: 100% width */
}
```
Dark mode:
- Add `<meta name="color-scheme" content="light dark">` and `<meta name="supported-color-schemes" content="light dark">`.
- `@media (prefers-color-scheme: dark)` is only partially supported: Apple Mail honors it well; Gmail typically applies its own color inversion and ignores the media query; Outlook may force a full invert.
- Safe rules when dark mode cannot be controlled: use a transparent-background PNG logo that reads on both light and dark grounds (or add a light stroke); never use pure black text on a transparent ground; give important blocks such as the CTA a solid background color; test in at least one dark-mode client before sending.
### 5. Fill the required placeholders
- First-name merge tag — syntax depends on the ESP
- Unsubscribe link — legally required
- Company postal address — must be real
- Primary CTA link — real URL with UTM parameters per `14-email-marketing-global`
| ESP | First-name merge tag | Unsubscribe |
|-----|----------------------|-------------|
| Klaviyo | `{{ first_name\|default:"there" }}` | `{% unsubscribe %}` |
| Mailchimp | `*\|FNAME\|*` | `*\|UNSUB\|*` |
| HubSpot | `{{ contact.firstname }}` | injected automatically |
| Brevo | `{{ contact.FIRSTNAME }}` | `{{ unsubscribe }}` |
Always confirm the exact syntax in the sending platform before the final send — an unrendered merge tag in a live send is a visible error.
## Email client matrix
| Client | Rendering behavior | What to do about it |
|--------|--------------------|---------------------|
| Gmail (web and app) | May strip `<style>` in some contexts; applies its own dark-mode inversion | Inline everything; the single-column layout must read even if media queries are dropped |
| AKe hoach Fullstack Marketing — master skill tong hop chien luoc, noi dung, trien khai, hieu suat, va timeline. Goi cac skill con de hoan thien output.
Use when the user needs an overall marketing plan for a period — objectives, segments, positioning, channel mix, content direction, budget, timeline, KPIs, and a risk matrix, adapted to US, EU, SEA, or LATAM. Trigger on 'marketing plan', 'marketing strategy for next year', 'go-to-market roadmap', 'plan for Q3', 'we have no marketing plan', 'where should we spend next quarter'. Also use when a founder only says the business needs to grow and has no idea which channel to start with. Not for — one specific campaign, see `02-campaign-brief-global`; working backward from a revenue goal to spend, see `10-reverse-kpi-global`; splitting a budget across channels and months, see `61-budget-planning-global`; taking a brand new product to market, see `59-go-to-market-global`.
Use when the user needs a monthly or weekly content calendar — posting schedule per channel, funnel ratio, content pillars, repurposing matrix, and an owner per slot. Trigger on 'content calendar', 'posting schedule', 'what should we post this month', 'editorial calendar', 'social media plan', 'we post randomly with no plan'. Also use when the user only says the team keeps running out of things to post. Not for — the brief for one specific post, see `36-content-brief-global`; the caption text itself, see `37-social-caption-global`; deciding next period content from last period data, see `40-next-content-plan-global`; a paid campaign timeline, see `02-campaign-brief-global`.
Lich noi dung thang — len lich dang bai da kenh voi ti le pheu, content pillar, repurposing matrix, va scoring tieu chi.
Brief chien dich marketing — 9 phan day du tu Context den Risk, bao gom creative direction, RACI, budget allocation theo phase, va auto-trigger cac skill lien quan.
Use when a specific campaign needs a brief the whole team can execute from — context, objective, audience, core message, creative direction, channels, deliverables, week-by-week timeline, approval gates, and risks. Trigger on 'campaign brief', 'creative brief', 'launch brief', 'brief the team on this campaign', 'we are running a promo next month', 'what is the plan for this campaign'. Also use when the user describes a promotion out loud and asks for something the team can actually run. Not for — the whole period plan, see `00-marketing-plan-global`; the list of design files needed, see `41-campaign-asset-list-global`; assigning work to one person, see `64-team-brief-global`; a new product launch sequence, see `59-go-to-market-global`.
Danh gia hieu suat marketing — audit performance ads va organic, chan doan root cause, de xuat toi uu voi action plan 48h va checklist hang tuan.
Use when marketing numbers look bad and the user needs to know WHY — layered root-cause diagnosis across tracking, delivery, creative, landing page, offer, and audience quality, 5-Whys, regional benchmarks for US, EU, SEA, and LATAM, and a 48-hour action plan. Covers dropshipping ROAS and BE-ROAS. Trigger on 'why is CPA so high', 'my ads are not converting', 'ROAS dropped', 'we are burning budget', 'performance is bad this month', 'diagnose the funnel'. Also use when the user pastes a screenshot of numbers with no question attached. Not for — auditing account configuration and scoring health, see `21-ads-audit-global`; writing a report someone else reads, see `07-marketing-report-global`; turning a raw export into insight, see `13-data-analysis-global`.