Skip to the page
html email reference · inline styles

Background colors in HTML email

type
attribute + inline style, paired
applies to
table cells and tables needing a background fill
screen reader effect
n/a
common values
bgcolor="#2563eb" style="background-color: #2563eb;"

Where it goes

On any <td> or <table> that needs a solid background color, especially inside a bulletproof button.

Example

<td bgcolor="#2563eb" style="background-color: #2563eb; padding: 12px;">
  Content
</td>

Open this example in the editor →

Common mistakes

  • Setting only background-color and skipping bgcolor — some older or stripped-down clients render a plain white cell instead.
  • Letting the two values drift out of sync after an edit — updating one color without the other silently reintroduces the exact inconsistency this pattern exists to prevent.

Related

Updated 24 October 2026. Practice it in the html email route, or read more on MDN.