---
name: email-html-engine
description: Generate bulletproof HTML email code that renders correctly across Gmail, Outlook, Apple Mail, Yahoo, and mobile clients. Use when creating HTML emails, email templates, or any HTML content for email delivery. Handles table-based layouts, inline CSS, MSO conditionals, and cross-client compatibility.
---
# Email HTML Engine
Email HTML is NOT web HTML. Outlook uses Microsoft Word's rendering engine. Gmail strips styles. This skill ensures every email renders correctly everywhere.
## Architecture: Table-Based Layout
ALL layout must use tables. No exceptions.
```html
```
## Required Attributes
Every table MUST have:
```html
```
Every image MUST have:
```html
```
## Safe CSS Properties
ONLY use these—everything else is unreliable:
| Property | Notes |
|----------|-------|
| `background-color` | Use hex codes |
| `color` | Use hex codes |
| `font-family` | Always include fallback stack |
| `font-size` | Use px, not rem/em |
| `font-weight` | 400, 700 most reliable |
| `font-style` | normal, italic |
| `text-align` | left, center, right |
| `text-decoration` | none, underline |
| `line-height` | Use px or unitless number |
| `letter-spacing` | Mostly works, use sparingly |
| `padding` | All forms, use on `` |
| `border` | All forms |
| `width` | Use both attribute and style |
| `height` | Unreliable, prefer natural height |
| `vertical-align` | top, middle, bottom |
| `display` | Only block, inline, none |
## NEVER Use These CSS Properties
| Property | Why |
|----------|-----|
| `margin` | Outlook ignores or breaks |
| `float` | Broken in most clients |
| `position` | Completely unsupported |
| `flexbox` | Not supported in email |
| `CSS Grid` | Not supported in email |
| `border-radius` | Outlook ignores completely |
| `box-shadow` | Most clients ignore |
| `max-width` | Outlook 2007-2016 ignores |
| `calc()` | Limited support |
| `CSS variables` | Not supported |
## Outlook-Specific Fixes (MSO Conditionals)
Outlook requires explicit widths. Wrap fluid content:
```html
```
## Responsive Technique: Fluid Hybrid
Works WITHOUT media queries (Gmail app strips them):
```html
```
## Email-Safe Font Stacks
```css
/* Elegant/Serif */
font-family: Georgia, 'Times New Roman', serif;
/* Modern/Clean */
font-family: 'Trebuchet MS', 'Lucida Sans', Arial, sans-serif;
/* Professional */
font-family: Verdana, Geneva, sans-serif;
/* Fallback-safe */
font-family: Arial, Helvetica, sans-serif;
/* Monospace (for codes/receipts) */
font-family: 'Courier New', Courier, monospace;
```
## Button Pattern (Bulletproof)
Works in ALL clients including Outlook:
```html
```
## Size Limits
| Limit | Value | Consequence |
|-------|-------|-------------|
| Total HTML size | < 102 KB | Gmail clips email with "View entire message" link |
| ` |