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
Related Glossary Terms
Dark Mode
Dark mode in email refers to how email clients render messages when the recipient has dark mode enabled. It affects colour display, image rendering, and readability. Designers use CSS media queries and hybrid coding techniques to control the dark mode appearance.
Drag-and-Drop Email Editor
A drag-and-drop email editor is a visual interface that allows marketers to build email layouts by dragging content blocks into place without writing HTML or CSS code.
Email Accessibility Guidelines
Email accessibility guidelines ensure emails are usable by people with disabilities, following WCAG standards for screen readers, colour contrast, keyboard navigation, and readable content.
Email Accessibility
Email accessibility ensures marketing emails are usable by people with disabilities, including those using screen readers, keyboard navigation, or assistive technologies. It follows WCAG 2.1 guidelines for structure, contrast, semantics, and descriptive content.
Attachment
An email attachment is a file sent along with an email message — while common in personal and business correspondence, attachments are generally discouraged in marketing emails due to security, deliverability, and compatibility concerns.
Email Body
The email body is the main content area of an email message, containing the visible text, images, and structural elements that communicate the message to the recipient.
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.