Definition
Cellpadding is an HTML attribute (cellpadding="") applied to <table> elements that defines the amount of space, in pixels, between the border of a table cell and its content. In email design, where tables are the foundation of layout structure, cellpadding is one of the primary tools for controlling spacing within cells.
Cellpadding can be set on the table element (applying to all cells) or overridden on individual cells using the td padding CSS property. Modern email development favours CSS padding over the HTML cellpadding attribute for more granular control, but cellpadding remains useful for Outlook compatibility where CSS padding support is inconsistent.
Cellpadding vs CSS Padding
| Property | Scope | Outlook Support |
|---|---|---|
| cellpadding="10" | All cells in the table | Universal |
| td { padding: 10px; } | Specific cells | Good in most versions |
| td style="padding: 10px" | Individual cell | Good in most versions |
Best Practices
- Use
cellpaddingat the table level for default spacing - Override specific cells with inline CSS padding when needed
- Set
cellpadding="0"on layout tables to remove default spacing - Use padding on specific cells for precise spacing control
- Combine
cellpaddingwithcellspacingfor complete layout control - Test cellpadding rendering in Outlook desktop where behaviour differs
- Avoid excessive padding that breaks mobile layouts — test at different screen sizes
Was this useful?
Related Glossary Terms
Above the Fold in Email
Above the fold in email refers to the content visible to a recipient before they scroll, a critical area for first impressions and primary calls to action.
Accessible CTA (Email)
An accessible CTA is a button or link coded with sufficient colour contrast, visible focus states, descriptive screen-reader text, and a minimum touch target of 44×44 pixels.
Adaptive Design
Adaptive design in email uses predefined layouts that adjust to specific device or client widths, rather than fluidly resizing to every possible screen.
AI-Generated Content in Email
AI-generated content in email is copy, images, code or subject lines produced by artificial intelligence tools to speed up campaign production and testing.
Alt Text
Alt text is the written alternative to an image in an email, displayed when images are blocked, slow to load, or consumed by screen readers.
Autoplay Video in Email
Autoplay video in email refers to the limited ability to play video content automatically when an email is opened, using specific client-supported techniques.
Frequently Asked Questions
Cellpadding is the space inside a cell between its border and content. Cellspacing is the space between adjacent cells. Both are HTML table attributes. In email design, cellpadding controls internal spacing of content, while cellspacing controls the gaps between table cells and is often set to 0 for layout tables.
Use both. Set `cellpadding="0"` on your table to neutralise default browser spacing, then apply inline CSS padding to individual cells for precise control. This approach works across all email clients, including Outlook, while giving you fine-grained control over spacing.