So installieren Sie eine HTML-E-Mail-Signatur in Gmail (2026)
Gmail’s signature editor is a relic. It strips <style> blocks, mangles nested tables, and injects random <br> tags that break your layout. If you have ever pasted a pixel-perfect HTML signature into the Gmail compose window only to see it turn into a block of monospaced garbage, you know the pain.
Installing a proper HTML signature in Gmail in 2026 requires a workaround that bypasses the web interface entirely. The only reliable method is to paste the raw HTML into the Gmail signature field via a browser’s developer tools. This guide walks through that process step by step, covers the gotchas that still exist in 2026, and explains how to keep your signature rendering correctly across Gmail on the web, iOS, and Android.
Why Gmail still cannot handle HTML signatures natively
Gmail’s signature editor has not changed meaningfully in years. It is a stripped-down rich text field that strips out most of the HTML you paste in. Specifically, it removes:
<style>and<link>tags (no embedded CSS)<meta>tags- Most inline JavaScript
<head>and<body>wrappers- Unknown or deprecated attributes
What survives is inline CSS on individual elements, basic table markup, and standard inline tags like <span>, <a>, <img>, and <br>. This means your signature must be built entirely with inline styles and table-based layout. No external stylesheets, no CSS classes, no <style> block.
Gmail also adds its own markup on top of your pasted HTML. It wraps everything in a <div> with inline styles, and it may insert <br> tags where you did not put them. The result is that even a well-formed HTML signature can look broken after Gmail’s editor processes it.
The fix is to bypass the editor entirely by injecting the raw HTML directly into the DOM via the browser’s developer tools. This method has worked since 2020 and still works in 2026.
Step-by-step: inject HTML into Gmail’s signature field
Prerequisites
- A desktop browser (Chrome, Edge, or Firefox)
- Your HTML signature as a single file or a block of inline HTML
- Gmail open in a tab, logged into the account you want to update
The injection method
Open Gmail settings. Click the gear icon in the top right, then “See all settings.”
Scroll to the Signature section. Under “General” > “Signature,” either create a new signature or click “Edit” on an existing one.
Open the developer tools. Right-click anywhere on the page and select “Inspect” (or press
Ctrl+Shift+I/Cmd+Option+I).Find the signature editor iframe. Gmail loads the signature editor inside an iframe. In the Elements panel, search for
iframeor look for a node withrole="textbox"org_editable="true". It is usually inside a<div>withclass="Ar Au".Switch to the iframe context. In the Console panel, you may need to select the iframe first. Run this in the console:
document.querySelector('iframe[role="presentation"]').contentDocument.body.innerHTML = 'YOUR_HTML_HERE';Replace
YOUR_HTML_HEREwith your full signature HTML, escaped properly (single quotes inside the HTML must be escaped with\').Alternative: paste via the editor’s innerHTML. If the iframe selector fails, try:
document.querySelector('[g_editable="true"]').innerHTML = 'YOUR_HTML_HERE';Verify and save. Click outside the editor to trigger Gmail’s save. Then scroll down and click “Save Changes.” Compose a new email to test.
Common pitfalls in 2026
- Gmail wraps your HTML in a
<div>with inline styles. This is normal. Your signature will still render correctly as long as your own markup uses inline styles. - Images may not load. Gmail blocks external images by default. If your signature includes an image (e.g., a logo hosted on your server), recipients will see a broken image icon unless they click “Display images below.” Use a hosted image URL with HTTPS, and set
widthandheightattributes to reserve space. - Line breaks get added. Gmail sometimes inserts
<br>tags at the start or end of your signature. Trim them in the editor after injection, or wrap your entire signature in a single<table>to contain the layout.
How to build a Gmail-compatible HTML signature
If you are writing the HTML by hand, follow these rules to ensure it survives Gmail’s editor and renders correctly in Outlook, Apple Mail, and mobile clients.
Use only inline styles
Every element must have its styles declared inline. No <style> block, no <link> to a CSS file. Example:
<table cellpadding="0" cellspacing="0" border="0" style="font-family: Arial, sans-serif; font-size: 14px; color: #333;">
<tr>
<td style="padding-right: 10px;">
<img src="https://example.com/logo.png" width="60" height="60" alt="Logo" style="display: block; border: 0;">
</td>
<td>
<span style="font-weight: bold; font-size: 16px;">Jane Doe</span><br>
<span style="color: #666;">CEO, Example Corp</span><br>
<a href="mailto:[email protected]" style="color: #1a73e8; text-decoration: none;">[email protected]</a>
</td>
</tr>
</table>
Keep it narrow
Most email clients render signatures at around 500–600px wide. Use a fixed-width table (e.g., width="500") to prevent your signature from stretching across the entire email.
Avoid unsupported tags
<div>: Works in Gmail but can cause layout shifts in Outlook.<p>: Adds unwanted margins. Use<span>and<br>instead.<style>: Stripped by Gmail.<script>: Stripped by Gmail.<form>,<input>,<button>: Stripped or ignored.
Test in multiple clients
What works in Gmail may break in Outlook or Apple Mail. Use a tool like Litmus or Email on Acid to preview your signature across clients. At minimum, test in:
- Gmail (web, iOS, Android)
- Outlook (desktop, web, iOS, Android)
- Apple Mail (macOS, iOS)
How to update your signature across all Gmail accounts
If you manage multiple Gmail accounts (personal, work, side project), you have to repeat the injection process for each one. There is no API or bulk import for Gmail signatures in 2026.
A faster workflow for multiple accounts
- Save your HTML signature as a file on your desktop.
- Open the file in a text editor and copy the entire contents.
- For each account, log in, open settings, and run the injection script from the console.
- Paste the HTML directly into the console command, replacing
'YOUR_HTML_HERE'.
To avoid escaping issues, store the HTML in a variable first:
var sig = `PASTE_YOUR_HTML_HERE`;
document.querySelector('[g_editable="true"]').innerHTML = sig;
Backticks (template literals) let you paste multi-line HTML without escaping single or double quotes.
What breaks in Gmail signatures in 2026
Image hosting and caching
Gmail caches images on its own proxy servers. If you update your logo on your server, it may take hours or days for the new image to appear in sent emails. To force a refresh, change the image filename or add a query parameter (e.g., ?v=2).
Dark mode rendering
Gmail on iOS and Android inverts light backgrounds and text colors in dark mode. If your signature has a white background with dark text, Gmail may flip it to a dark background with light text — but it can also leave some elements untouched, creating a mess.
To handle dark mode, use the [data-ogsc] and [data-ogsb] attributes that Gmail injects, or rely on the prefers-color-scheme media query in a <style> block (though Gmail strips <style> on the web, it works in Apple Mail and Outlook.com). A simpler approach: use a transparent background and ensure text colours have sufficient contrast in both modes.
Spam filters
Signatures with too many links, large images, or suspicious domains can trigger spam filters. Keep links to a minimum (usually one for your website and one for your email address). Avoid link shorteners like bit.ly or t.co in signatures.
How newmail.click handles this
Newmail.click generates Gmail-compatible HTML signatures automatically. You fill in your details, pick a template, and copy the output — it is already inline-styled and table-based, ready for the injection method above. The free tier includes the signature builder and basic templates. The Pro tier adds click and open tracking on links in your signature, with alerts sent to Slack or email when someone clicks. Pro also sets sensible UTM defaults on your links so you can track signature traffic in your analytics. We do not offer a Team plan, SSO, or SCIM — this is a focused tool for individuals and small teams who need a clean signature with optional tracking.
Injecting an HTML signature into Gmail is not elegant, but it is the only way to get a pixel-perfect result in 2026. Once you have the process down, you can update any account in under a minute — and your signature will render correctly in every email you send.