Lesson 9 of 9
HTML Email Development
HTML email development is a specialized skill because email clients (Outlook, Gmail, Yahoo) use outdated rendering engines. Modern CSS features like flexbox, grid, and media queries have limited support. Tables are still the primary layout method for emails. Understanding HTML email quirks is valuable - email developers are in high demand.
HTML Email Rules
- Use tables for layout - Email clients don't support CSS Grid or Flexbox reliably. Tables work everywhere.
- Inline CSS only - Many email clients strip <style> tags. Put styles directly on elements: style='color: #333'.
- 600px max width - Standard email width that works in all clients and on mobile.
- No JavaScript - Email clients block all JavaScript for security. Everything must be static HTML/CSS.
- Images may be blocked - Many clients block images by default. Always include alt text.
- Test in multiple clients - Litmus or Email on Acid test rendering in 90+ email clients.
- Use <table role='presentation'> - Tells screen readers the table is for layout, not data.
- MSO conditionals - <!--[if mso]> for Outlook-specific code. Outlook uses Word rendering engine.
Warning
HTML email development is drastically different from web development. You cannot use Flexbox, CSS Grid, external stylesheets, JavaScript, or even some common CSS properties like 'margin: auto' in Outlook. Always test in Litmus or Email on Acid across 90+ email clients before sending.
HTML emails require robust table-based structures to render across email clients
Practice Task: Advanced Features Mini-Project
- Create a custom element called <info-card> that accepts 'title' and 'description' attributes and renders them inside a Shadow DOM with scoped styling
- Add a manifest.json file to any existing HTML project with name, short_name, icons, theme_color, and display fields
- Add <link rel='preconnect'> for Google Fonts and <link rel='preload'> for your critical CSS file in the <head> of a page
- Run a Lighthouse performance audit and try to achieve a score of 90+ on all categories
Module 11 - Knowledge Check
What are the three core technologies that make up Web Components?
Key Takeaways
- HTML email development is a specialized skill because email clients (Outlook, Gmail, Yahoo) use outdated rendering engines.
- Use tables for layout - Email clients don't support CSS Grid or Flexbox reliably. Tables work everywhere.
- Inline CSS only - Many email clients strip <style> tags. Put styles directly on elements: style='color: #333'.
- 600px max width - Standard email width that works in all clients and on mobile.
Finished this lesson?