HTML Email Spacers

Spacers are invisible blocks used to add vertical space between sections of your email. Since CSS margin and padding are unreliable in some email clients (especially Outlook), the most dependable way to create space is by using table-based spacers.


✅ Best Practices

TipWhy It Matters
Use <table> and <td> for spacingWorks consistently across all major email clients
Avoid relying only on CSS margin or paddingMany clients ignore or override these styles
Always use line-height, font-size, and &nbsp;Ensures the spacer renders properly
Test spacers on mobile and desktopSome clients collapse empty table rows

🔧 Basic Spacer Example

See the Pen Basic Spacer Example by Email Code Camp (@EmailCodeCamp) on CodePen.

This creates 30px of vertical space. Adjust the height and line-height values to increase or reduce spacing.


📐 Spacer Sizes (Common Values)

Spacer TypeHeight
Small spacer10px
Standard spacer20px
Large spacer30px
Section separator40px+

Use consistent spacing to keep your layout clean and readable.


💡 Spacer Tips

  • Always include &nbsp; in the spacer cell to ensure the space renders in all clients
  • Avoid empty <tr> or <td> without styles—they may collapse in some environments
  • Use spacers instead of margin-top or margin-bottom when working with elements inside tables
  • Nest spacers inside layout tables for more precise control

🧪 Bonus: Spacer Between Components

See the Pen Spacer Between Components by Email Code Camp (@EmailCodeCamp) on CodePen.