Simple Layout: Free HTML Email Tutorial
Master HTML Email Development with Table-Based Layouts
HTML email development requires different techniques than modern web development due to inconsistent CSS support across email clients. Tables remain essential for reliable cross-client rendering.
Core HTML Email Concepts
Table-Based Layouts
Learn why tables are essential for HTML email layout consistency across different email clients with limited CSS support.
Inline CSS Styling
Master inline CSS techniques required for Gmail and other clients that don't support external stylesheets or embedded styles.
Cross-Client Compatibility
Understand email client quirks and implement solutions for consistent rendering across different platforms.
Single Image vs HTML Email Approach
Project Setup Process
Launch Code Editor
Open Visual Studio Code, Sublime Text, or your preferred editor for HTML development
Open Project Files
Navigate to Desktop > Class Files > yourname-HTML Email Class > Omniburger folder
Edit Document Title
Add meaningful title for email client compatibility and web preview
The content displays properly, but professional email design requires centered alignment for optimal visual impact across all viewing environments.
TIP: Keep birthday.html open in your browser and use the refresh function to quickly preview changes as you code. This iterative approach speeds development and helps catch issues early.
Return to birthday.html in your code editor to implement centering.
Center the content within the table cell by adding the align attribute:
<td align="center">
<h1>Happy Birthday!</h1>
<p>The world is your burger. So have one with fries on us!</p>
<img src="img/free-burger.jpg" height="480" width="537" ALT="Free Burger Coupon">
<img src="img/footer.png" height="47" width="598" ALT="Omniburger">
</td>
NOTE: Always declare alignment attributes explicitly for table cells. While browsers default to left alignment, nested tables can cause inheritance issues where parent cell alignment overrides child elements. Explicit declaration prevents rendering inconsistencies across email clients.
Save and preview your changes. The content centers nicely within the cell, but we also need to center the entire email within the browser window and email preview pane. Return to your code editor.
Center the complete table structure by adding the align attribute to the <table> tag:
<table width="600" cellpadding="0" cellspacing="0" border="0" align="center">Save the file and refresh your browser preview. The email now displays with professional centering that will work consistently across email clients.
Development Workflow Tips
Live Preview Setup
Keep birthday.html open in browser for easy reloading. Use Chrome for most accurate rendering preview.
VS Code Integration
Install open in browser extension for quick preview with Option-B (Mac) or Alt-B (Windows) shortcuts.
Gmail does not support external stylesheets or embedded styles in head/body. All styles must be inline, element by element, for reliable rendering.
Inline Styling Process
Add Font Family
Use web-safe fonts with fallbacks: 'Arial Black', sans-serif for consistent rendering
Set Font Size and Color
Apply specific pixel sizes and hex colors for precise control across email clients
Control Margins
Reset default margins and add specific spacing for professional appearance
Key Takeaways

