Use presentation tables for critical HTML email layout. Flexbox and Grid are reasonable authoring abstractions only when your compiler transforms them or when the layout can safely degrade.
That is the practical answer to tables vs. Flexbox vs. Grid in email. Modern CSS support has improved, but classic Outlook and inconsistent sanitization keep tables as the broad compatibility baseline.
Quick comparison
| Layout | Best use | Main advantage | Main risk |
|---|---|---|---|
| Tables | Production structure | Broad, predictable support | Verbose source |
| Flexbox | Simple progressive enhancement | Easy alignment and source order | Partial client behavior |
| Grid | Non-essential modern layouts | Powerful two-dimensional layout | Weak universal baseline |
Why tables still work
Email rendering engines have handled tables for decades. A presentation table can express:
- centered containers;
- columns;
- vertical alignment;
- fixed and fluid widths;
- background colors;
- section spacing; and
- button surfaces.
<table role="presentation" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="50%" valign="top" style="padding-right:12px">...</td>
<td width="50%" valign="top" style="padding-left:12px">...</td>
</tr>
</table>
role="presentation" tells assistive technology that the table is layout, not data.
Table disadvantages
Tables create deeply nested markup and are unpleasant to write by hand. Spacing may need cell padding or spacer rows. Responsive stacking requires classes and media queries.
These are developer-experience problems a compiler can solve. The recipient does not care whether a component began as a div or table; only the exported markup matters.
Flexbox in email
Flexbox is useful for simple source:
<div class="flex items-center justify-between gap-4">...</div>
Do not assume that source can ship unchanged. A Tailwind email compiler can translate:
flex-rowinto table cells;items-centerinto cell vertical alignment;justify-centerinto table alignment; andgap-4into cell padding.
This works best for predictable rows. Wrapping, ordering, and nested flexible sizing are much harder to reproduce across clients.
CSS Grid in email
Grid is excellent for web interfaces and weak as a universal email baseline.
<div class="grid grid-cols-3 gap-4">...</div>
A compiler may translate a fixed three-column grid into a table row. Complex templates using auto-fit, dense placement, overlapping areas, or arbitrary tracks should be redesigned for email.
If losing the grid only changes decoration, progressive enhancement may be acceptable. If it changes reading order or hides an offer, use tables.
Source vs. output
Modern authoring can coexist with conservative output:
Tailwind flex/grid source
โ
email-aware layout transformer
โ
presentation tables + inline styles
This gives developers readable components without transferring browser assumptions to the inbox.
Read how Tailwind becomes email-safe HTML.
Responsive columns
Desktop table cells can stack on mobile using a retained media query:
@media screen and (max-width: 600px) {
.stack-column {
display: block !important;
width: 100% !important;
}
}
Keep the source order logical. Do not depend on complex CSS reordering; screen readers and clients without the query will follow the HTML order.
Spacing and gap
gap is convenient in source, but output should use a dependable strategy:
- padding on cells;
- dedicated gutter cells;
- section padding; or
- a tested retained rule where support is acceptable.
Be careful at the outer edges. A naive converter may add half-gap padding and make the row wider than its container.
Alignment
Map important alignment to both CSS and attributes:
<td align="center" valign="middle"
style="text-align:center;vertical-align:middle">
This reinforces behavior in older clients.
Accessibility
Layout tables are acceptable when marked as presentation and kept simple.
- Add
role="presentation". - Preserve a logical reading order.
- Do not use header cells for layout.
- Keep real data tables semantic.
- Avoid spacer tables that create confusing empty announcements.
When to use each approach
Use tables when
- the layout is critical;
- Outlook desktop matters;
- columns, buttons, or alignment must be predictable; or
- the component is part of a shared production library.
Use Flexbox source when
- your compiler has a defined translation;
- the row is simple;
- source clarity matters; and
- a fixture proves the output.
Use Grid source when
- the pattern is fixed and transformable;
- the grid is progressive enhancement; or
- target-client data supports the risk.
Common mistakes
Shipping browser layout directly
The preview may look perfect while Outlook collapses the row.
Using tables without presentation roles
Screen readers may announce layout metadata.
Depending on CSS order changes
Keep the correct reading order in source.
Converting every div blindly
Only structural containers should become tables. Text grouping can remain simple.
Ignoring nested width math
Cell padding, borders, and gutters can push rows beyond 100 percent.
Frequently asked questions
Are tables required for HTML email?
Not for every element, but they remain the safest common denominator for important layout.
Does Gmail support Flexbox?
Some Gmail contexts support useful Flexbox behavior, but broad email compatibility requires more than one client. Use a fallback for critical structure.
Does Outlook support CSS Grid?
Do not use Grid as the baseline for classic Outlook. Transform the layout or use tables.
Can TailwindMail convert Flexbox and Grid?
TailwindMail rewrites supported layout patterns into email-safe structures. Complex web layouts should still be simplified and tested.
Use modern source, ship proven structure
Tables, Flexbox, and Grid are not competing ideologies in an email workflow.
Use the abstraction that keeps source maintainable, then require the compiler to produce a proven table baseline. The inbox only sees the output.
Share with friends