Skip to content

HTML email signature code that works in Gmail and Outlook

How to structure HTML email signature code, where Gmail draws the line at 10,000 characters, and how to paste it into Gmail and classic Outlook.
The Sendoff team3 min read

Need a signature that works in Gmail and Outlook? Build one free in about two minutes, no account needed.

Make my signature

An HTML email signature is a small block of markup that the mail client places under your message. Gmail caps the whole signature at 10,000 characters, images included. Build it from tables with inline styles, link images from public HTTPS addresses with width and height set, and paste it into the signature editor as formatted content.

What the code needs

A signature that holds up across clients has three traits:

  • Table layout. Put the logo and text in a <table>, not in <div> blocks or flexbox. Sendoff builds every signature this way.
  • Inline styles. Put style attributes on each element. Do not rely on a <style> block in the head of the document.
  • Hosted images with size and alt text. Every <img> needs a public https:// src, a width, a height and an alt attribute.

A minimal example:

<table role="presentation" cellpadding="0" cellspacing="0" style="font-family:Arial,sans-serif;font-size:14px;color:#222222;">
  <tr>
    <td style="padding-right:12px;vertical-align:top;">
      <img src="https://example.com/logo.png" width="96" height="96" alt="Acme Ltd logo" style="display:block;border:0;">
    </td>
    <td style="vertical-align:top;">
      <strong style="font-size:16px;">Sara Haddad</strong><br>
      Operations Manager, Acme Ltd<br>
      <a href="tel:+96265550100" style="color:#1a56db;">+962 6 555 0100</a>
    </td>
  </tr>
</table>

How long can the code be?

Gmail accepts up to 10,000 characters of signature HTML. Your image counts toward that limit too. Gmail's help page says that if you get an error, you should resize the image. Inline styles add characters fast, so repeat as few style attributes as you can.

How do I paste it into Gmail?

  1. Go to Gmail on a computer, click the Settings icon, then click See all settings.
  2. In the Signature section, click in the box and paste your signature. Paste formatted content, not the HTML source.
  3. If you keep more than one signature, choose the default for new emails and for emails you reply to.
  4. At the bottom of the page, click Save Changes.

Send yourself a test message and open it in another account. The settings box shows an approximate preview, and the received message is the real test.

How do I paste it into classic Outlook for Windows?

  1. Start a new message, open the Message menu, choose Signature, then Signatures.
  2. In the E-mail account list, pick the account. Click New, enter a name.
  3. Paste or type into Edit signature. To add a picture, click the Image button, choose the file and click Insert.
  4. Under Choose default signature, set a signature for New messages and for Replies/forwards, then click OK.

Classic Outlook does not add the new signature to the message you already have open. Use Message, then Signature, to insert it by hand.

Why do images disappear for recipients?

Two separate things cause this, and neither is in your HTML.

Gmail shows external images by default, but each recipient can change that in Settings, then See all settings, in the Images section. The two options are "Always display external images" and "Ask before displaying external images". Gmail also hides images from senders it considers suspicious, and you cannot override that from the signature.

Classic Outlook had a bug of its own. Microsoft's known-issue page says that after the May 12, 2026 updates, images in signatures were not displayed, and that replies or forwards may permanently lack the image. The page lists fixed builds and marks the issue as fixed. Check your build against that page before you change your code.

Whatever the cause, keep your name, title and phone number as plain text, so the signature still reads properly with images switched off.

Quick checks when something breaks

  • Gmail says the signature is too long. Remove a banner, shorten the disclaimer or cut repeated style attributes.
  • The logo shows as a broken icon. Open the image URL in a private browser window. If it does not load there, the host is blocking it or the link is not public HTTPS.
  • Arabic text sits on the wrong side. Add dir="rtl" to the outer table and mirror any left and right padding.

How Sendoff handles this

The Sendoff generator writes signature HTML with tables and inline styles, hosts uploaded images on HTTPS, sets width and height on each image and shows a live character count against Gmail's 10,000 limit. Arabic signatures get dir="rtl". Build yours in the email signature generator, then follow the Gmail guide or the Outlook guide to install it.

Sources

Make yours now

Every Sendoff template is built to the rules in these guides. Free, no account needed.