Creating Custom HTML Templates
For developers and designers who want complete control, MailGreet’s HTML Editor provides full HTML/CSS capabilities with syntax highlighting, live preview, and variable support.When to Use HTML Editor
Use HTML Editor For
- Complex custom designs
- Importing external templates
- Pixel-perfect layouts
- Advanced CSS styling
- Developer-controlled emails
Use Block Builder For
- Quick email creation
- Non-technical users
- Standard layouts
- Easy editing by team
- Mobile-responsive defaults
Creating an HTML Template
1
Go to Templates
Navigate to Templates in the sidebar
2
Click Create Template
Click the green Create template button
3
Select HTML Editor
Choose HTML Editor from the three format options:
- Block-Based Editor (Recommended)
- HTML Editor ← Select this
- Plain Text
4
Enter Template Details
Fill in the template information:
- Template Name — A descriptive name
- Description — Purpose of the template
- Category — Newsletters, Marketing, Events, Transactional, or Custom
5
Create Template
Click Create Template to open the HTML Editor
HTML Editor Interface
The HTML Editor provides a split-screen workspace:Top Bar Fields
Subject Line
The email subject line that appears in inboxes
Preheader
Preview text shown after the subject line
Editor Features
- Syntax Highlighting — Color-coded HTML/CSS for readability
- Line Numbers — Easy navigation for debugging
- Auto-Indent — Clean, organized code
- Live Preview — Instant visual feedback as you code
Writing Email HTML
Basic Template Structure
Start with this responsive email boilerplate:Using Variables
Insert personalization variables anywhere in your HTML:Importing External HTML
Have an HTML template from another source? Import it easily:1
Create New Template
Start a new HTML template as described above
2
Clear Default Content
Select all code in the editor and delete it
3
Paste Your HTML
Paste your external HTML code into the editor
4
Add Variables
Replace static content with MailGreet variables where needed
5
Test Preview
Check the live preview to ensure proper rendering
Exporting Templates
Export as HTML
Click Export HTML to download the raw HTML file for use elsewhere.Export as Template JSON
Export the complete template configuration for:- Backup purposes
- Sharing with team members
- Moving between MailGreet accounts
HTML Email Best Practices
Use Tables for Layout
Use Tables for Layout
Email clients have inconsistent CSS support. Use
<table> elements for reliable layouts, not <div> or flexbox.Inline Your CSS
Inline Your CSS
Many email clients strip
<head> styles. Use inline CSS on elements:Set Width 600px Max
Set Width 600px Max
Most email clients display best at 600px width. Use
max-width: 600px for your container.Always Include Alt Text
Always Include Alt Text
Images are often blocked by default. Add descriptive
alt attributes:Avoid JavaScript
Avoid JavaScript
JavaScript is stripped by all email clients. Never rely on JS for functionality.
Use Web-Safe Fonts
Use Web-Safe Fonts
Stick to web-safe fonts (Arial, Georgia, Times New Roman) or use font stacks with fallbacks.
Testing Your Template
Before using in campaigns:1
Check Live Preview
The right panel shows how your email renders
2
Test on Mobile
Resize your browser to check responsive behavior
3
Send Test Email
When used in a campaign, send a test to yourself
4
Check Multiple Clients
View in Gmail, Outlook, Apple Mail, etc.
Common Issues & Solutions
Related Guides
Block Editor
No-code visual editor alternative
Template Library
Browse and manage templates
Testing Campaigns
Test before sending
Create Campaign
Use templates in campaigns

