Navigate:
All Reposresponsive-html-email-template
~$RESPON0.0%

Responsive HTML Email Template: Simple email starter

Cross-client HTML email starter with inline CSS support.

LIVE RANKINGS • 06:51 AM • STEADY
OVERALL
#243
19
FRONTEND
#30
3
30 DAY RANKING TREND
ovr#243
·Front#30
STARS
13.7K
FORKS
4.4K
DOWNLOADS
1
7D STARS
+3
7D FORKS
0
See Repo:
Share:

Learn more about responsive-html-email-template

This is a starter HTML email template designed for use with email marketing platforms and transactional email services. The template uses responsive CSS media queries to adapt layout across desktop, mobile, and web email clients. It provides both a standard version for marketing platforms like Mailchimp that handle CSS inlining automatically, and a pre-inlined version for API-based services like Mailgun and SendGrid. The repository includes documentation on image attribute requirements for email client compatibility and has been tested across multiple email clients including Gmail, Outlook, Apple Mail, and mobile clients.

responsive-html-email-template

1

CSS inlining guidance

Provides both a standard HTML version and a pre-inlined CSS version, with clear documentation on when to use each depending on whether you're using a marketing platform or API service.

2

Multi-client testing

Template has been tested across major email clients on mobile, desktop, and web platforms, with visual documentation of rendering results.

3

Minimal structure

Focuses on a simple, clear layout with a single call-to-action button rather than complex multi-section designs, reducing compatibility issues across email clients.


const mailchimp = require('@mailchimp/mailchimp_transactional');
const client = mailchimp('your-api-key');

const emailHTML = `<!DOCTYPE html>
<html>
<!-- Use the non-inlined responsive template -->
<head><style>@media only screen and (max-width: 600px) { .mobile-stack { width: 100% !important; } }</style></head>
<body><table class="mobile-stack"><tr><td>Your content here</td></tr></table></body>
</html>`;

await client.messages.send({
  message: { html: emailHTML, subject: 'Welcome!', to: [{ email: 'user@example.com' }] }
});

vv1.0.1

Patch release fixes Outlook spacing issues and restores missing `.content-block` class from v1; no breaking changes.

  • Add the `.content-block` class back to your templates if you relied on it in v1 and it was missing.
  • Verify Outlook rendering if you experienced spacing bugs; this release includes targeted fixes for that client.
vv1.0.0

Initial stable release improves Gmail and mobile rendering, adds preheader text and iOS auto-linking support while keeping markup simple.

  • Use bulletproof buttons and preheader text for better inbox previews and click reliability across clients.
  • Expect automatic iOS detection for phone numbers, addresses, and links without additional configuration.


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers