Formatted phone number
- Input
- +55 11 99999-0000
- Expected output
- href="tel:+5511999990000"
The spaces and hyphen are stripped, but the country-code plus sign stays, since only digits and "+" survive the cleanup.
HTML email signature
An HTML email signature needs to survive an email client, not a browser, and the difference is significant: no external CSS, no `<style>` tag, and no flexible layout like flexbox, because Outlook desktop's rendering engine, inherited from Word, ignores all of it.
The spaces and hyphen are stripped, but the country-code plus sign stays, since only digits and "+" survive the cleanup.
Since the text does not start with "http://", "https://" or "mailto:", the normalization step adds "https://" before building the link.
The social links row only appears when at least one label-and-URL pair is filled in, and each link is separated by a light gray middle-dot character.
Copy the HTML, open Gmail in Settings › See all settings › General › Signature, create a new signature and paste. Gmail accepts pasting formatted HTML directly; save changes at the bottom of the page.
Because Outlook desktop renders the email body with the same engine as Word, which does not implement flexbox, grid, or most modern layout CSS. Tables with cells (`<td>`) are the only reliable way to place a photo and text side by side in that client.
Because several webmail clients, Gmail among them, strip `<style>` blocks from the `<head>` before displaying the message for security reasons. An inline `style` attribute on each `<div>` or `<a>` survives that cleanup because it travels with the element itself.
The photo cell or row is simply not generated; the final HTML has no blank space reserved in its place, so the signature adjusts to show only the identity and contact block.
Some email client signature settings fields cut or alter line breaks when pasting multi-line formatted HTML. Removing the line breaks and extra spaces before pasting keeps the table structure from getting corrupted in that process.
Ana Souza Product Designer · Acme Studio |
<table cellpadding="0" cellspacing="0" border="0" role="presentation" style="border-collapse:collapse;"><tr><td style="vertical-align:top; border-left:3px solid #4f46e5; padding-left:16px;"><div style="font-family: Arial, Helvetica, sans-serif; font-size:16px; font-weight:bold; color:#1a1a1a;">Ana Souza</div><div style="font-family: Arial, Helvetica, sans-serif; font-size:13px; color:#4f46e5; font-weight:bold; margin-top:2px;">Product Designer · Acme Studio</div><div style="margin-top:8px;"><div style="font-family: Arial, Helvetica, sans-serif; font-size:12px; line-height:18px; color:#555;"><span style="color:#4f46e5; font-weight:bold;">T</span> <a href="tel:+5511999990000" style="color:#555; text-decoration:none;">+55 11 99999-0000</a></div><div style="font-family: Arial, Helvetica, sans-serif; font-size:12px; line-height:18px; color:#555;"><span style="color:#4f46e5; font-weight:bold;">E</span> <a href="mailto:[email protected]" style="color:#555; text-decoration:none;">[email protected]</a></div><div style="font-family: Arial, Helvetica, sans-serif; font-size:12px; line-height:18px; color:#555;"><span style="color:#4f46e5; font-weight:bold;">W</span> <a href="https://acme.com" style="color:#555; text-decoration:none;">acme.com</a></div><div style="font-family: Arial, Helvetica, sans-serif; font-size:12px; line-height:18px; color:#555;"><span style="color:#4f46e5; font-weight:bold;">A</span> São Paulo, BR</div></div><div style="margin-top:8px;"><a href="https://linkedin.com/in/ana" style="font-family: Arial, Helvetica, sans-serif; font-size:12px; color:#4f46e5; text-decoration:none; font-weight:bold;">LinkedIn</a><span style="color:#cccccc;"> · </span><a href="https://instagram.com/ana" style="font-family: Arial, Helvetica, sans-serif; font-size:12px; color:#4f46e5; text-decoration:none; font-weight:bold;">Instagram</a></div></td></tr></table>The signature is built entirely in your browser. No data is sent to any server; the photo is referenced by the URL you provide.