Skip to main content

Responsive Email Template Builder

Build responsive HTML email templates that render consistently across Gmail, Outlook, Apple Mail, and mobile clients with bulletproof layouts.

Fill in the placeholders

Edit the values, then copy your finished prompt.

Your Prompt
prompt.txt
Build a responsive HTML email template for a product launch announcement email for LaunchPad. The email must render correctly in Gmail (web + mobile), Outlook 2016-365, Apple Mail, Yahoo Mail and follow modern tech brand with #4F46E5 primary color and clean typography brand guidelines. Implement step by step: 1) Set up the email document structure: DOCTYPE (HTML5 or XHTML 1.0 Transitional for maximum compatibility), xmlns for Outlook, meta viewport for mobile, and the conditional comment structure for Outlook-specific CSS (<!--[if mso]>). Include a 85-100-character preheader text that continues the subject line narrative. 2) Build the layout using a hybrid coding approach: 600px centered table for Outlook with CSS display:block fallback for modern clients. Create a 2-column layout using the "ghost table" technique where Outlook uses table cells and modern clients use inline-block divs that stack on mobile. 3) Design the email sections: header with logo, navigation links (View in Browser, Website, Blog), hero area with a 600px with 1200px @2x source hero image (with a bulletproof background color fallback), body content with 3 feature highlights with icon, heading, and description content blocks, a CTA button using VML for Outlook and CSS border-radius for others, and a footer with unsubscribe link and physical address (CAN-SPAM compliant). 4) Implement responsive behavior: at 480px width, stack columns vertically, increase font sizes to minimum 16px for readability, make buttons full-width, and hide decorative elements using display:none with mso-hide:all for Outlook. 5) Handle images: use hosted on CDN with fallback alt text and background color — provide width and height attributes for all images, alt text that makes sense when images are blocked, a ratio of image-to-text that avoids spam filters, and retina @2x images with width constraining. 6) Style the typography: define the font stack as Helvetica, Arial, sans-serif (web fonts are unreliable in email), set line-height in px not em, and apply text styling inline (no external stylesheets). 7) Add tracking: UTM parameters on all links, click tracking compatibility with SendGrid, and an open tracking pixel placement.

What this prompt does

This prompt hand-codes a responsive HTML email template for a [email_type] email for [brand_name] that renders consistently across [email_clients]. It works through the brittle realities of email HTML in order: document structure with Outlook conditional comments, a hybrid table-plus-div layout, the major sections, responsive behavior, image handling, inline typography, and tracking. Because email clients ignore much modern CSS, this bulletproof, table-based approach is the only reliable way to survive every inbox.

The variables control compatibility and layout. [email_clients] sets the rendering targets, [table_width] and [column_count] define the ghost-table structure that stacks on mobile, and [mobile_breakpoint] with [mobile_font_size] governs the responsive shift. [image_strategy] and [font_stack] acknowledge that web fonts and unblocked images are unreliable, so it specifies fallbacks, alt text, and a safe font stack. [preheader_length] and [esp_name] shape the inbox preview and tracking compatibility.

When to use it

  • Building a transactional or marketing email that must look right in Outlook and Gmail alike.
  • Hand-coding a template where modern CSS layout simply will not render reliably.
  • Creating a multi-column email that gracefully stacks on mobile via the ghost-table technique.
  • Ensuring a CTA button renders with VML in Outlook and border-radius elsewhere.
  • Adding a CAN-SPAM-compliant footer with unsubscribe and physical address.
  • Wiring UTM tracking and an open pixel compatible with [esp_name].

Example output

You get a complete, hand-coded email template: a compatibility-focused DOCTYPE with Outlook xmlns and viewport meta, a [preheader_length]-character preheader, a [table_width] centered ghost-table layout with [column_count] columns that stack at [mobile_breakpoint], header/hero/body/footer sections with a bulletproof VML CTA button, responsive rules bumping fonts to [mobile_font_size] and making buttons full-width, image handling per [image_strategy] with alt text and background fallbacks, inline typography using [font_stack], and tracking with UTM parameters and an open pixel for [esp_name].

Pro tips

  • Build the layout with nested tables and the ghost-table technique; div-and-flexbox layouts break in Outlook's Word-based rendering engine.
  • Inline every style; external and embedded <style> blocks are stripped or ignored by several of your [email_clients].
  • Stick to a web-safe [font_stack] like Helvetica/Arial; web fonts silently fall back in Outlook and many clients.
  • Always set width, height, and meaningful alt text on images, since [image_strategy] must assume images may be blocked by default.
  • Keep the [preheader_length] preheader as a real continuation of the subject line; it is prime inbox real estate that most senders waste on boilerplate.
  • Code the CTA with VML for Outlook and CSS border-radius elsewhere, or the button will render as a plain rectangle in Outlook.
  • Add UTM parameters on every link and place the open pixel so click and open tracking stays compatible with [esp_name] without bloating the markup or tripping spam filters.

Frequently Asked Questions

Why are tables required instead of modern CSS layout?
Outlook on Windows renders email with Microsoft Word's engine, which ignores flexbox, grid, and much positioning CSS. Nested tables and the ghost-table technique are the only layout approach that renders consistently across the full range of `[email_clients]` you target.
Will custom web fonts work in the email?
Unreliably. Many clients, including Outlook, strip web fonts and fall back to a default. That is why the prompt specifies a web-safe `[font_stack]` like Helvetica and Arial, so the email looks intentional even when your preferred font does not load.
How does the CTA button render correctly in Outlook?
The button uses VML, Microsoft's vector markup, for Outlook and standard CSS `border-radius` for other clients. Without the VML fallback, Outlook drops the rounded background and padding, leaving an unstyled link instead of a proper button.
Is the template compliant with anti-spam laws?
The footer step includes an unsubscribe link and a physical mailing address, which are CAN-SPAM requirements. You still need to honor unsubscribes and use accurate subject lines, but the template provides the structural compliance elements out of the box.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

More in Frontend Development Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

AI assistant · trained on my work

👋

Hey there!

Quick Actions

WhatsApp Direct line to me

Chat on WhatsApp

+880 1723 741224 · Replies within the hour on working days

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

mejba.13@gmail.com

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support