# Email link formatting \> Override Gmail defaults

**URL:** <https://forum.mautic.org/t/email-link-formatting-override-gmail-defaults/22095>\
**Category:** Product Support\
**Created:** [December 20, 2021, 5:46pm UTC](https://forum.mautic.org/t/email-link-formatting-override-gmail-defaults/22095 "2021-12-20T17:46:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aglyons](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aglyons/32/2825_2.png) [@aglyons](https://forum.mautic.org/u/aglyons)\
**Post date:** [December 20, 2021, 5:46pm UTC](https://forum.mautic.org/t/email-link-formatting-override-gmail-defaults/22095/1 "2021-12-20T17:46:38Z")

</div>

**Your software**  
My Mautic version is: 4.1.0  
My PHP version is: 7.4

**Your problem**  
Gmail formats links in emails and the only way to override Gmail formatting is to inline styles on the ‘a’ element. The automated links for emails, {unsubscribe\_text}, {unsubscribe\_url} and {webview\_url} don’t expose the ‘a href’ tag which makes it impossible to style these links.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/7/763e0d30f1cb998449eeb97866de7d790cbe0d73.png)

It would be great if we could add the style CSS inside the braces and have that incorporated,

I.E. {css:color: #ffffff !important;font-weight:100, unsubscribe\_text}

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [December 22, 2021, 12:05pm UTC](https://forum.mautic.org/t/email-link-formatting-override-gmail-defaults/22095/2 "2021-12-22T12:05:25Z")

</div>

Hi, this should point you in the right direction.

> **[Inline styles for a:link, a:hover etc in an email newsletter](https://www.sitepoint.com/community/t/inline-styles-for-a-link-a-hover-etc-in-an-email-newsletter/5861)**
>
> Help! Need to push out this email campaign now. CSS not supported in some email clients, so I need to set inline styles for the text links. Can’t seem to get it right. CSS below. My attempt at inline css inside the container div.

In short:  
`<a href="#" style="color: #555; ">example</a>`

---

<div class="post-metadata">

**Author:** ![aglyons](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aglyons/32/2825_2.png) [@aglyons](https://forum.mautic.org/u/aglyons)\
**Post date:** [December 22, 2021, 9:57pm UTC](https://forum.mautic.org/t/email-link-formatting-override-gmail-defaults/22095/3 "2021-12-22T21:57:16Z")

</div>

Hey Joey,

Yes, this is what I am saying. It has to be inline. But the Read Online and Unsubscribe tokens don’t expose the `<a href.../>` to put the style inline. It’s entered like this `{unsubscribe_text}`.

And, editing the unsubscribe text in the config would be global. In the event you want white unsub links for a specific email, it would essentially be white on every email template used.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [December 23, 2021, 7:21am UTC](https://forum.mautic.org/t/email-link-formatting-override-gmail-defaults/22095/4 "2021-12-23T07:21:52Z")

</div>

Hi, you are right, I answered without reading the post properly.  
Since your email is HTML, I suggest you make the proper changes in the header by adding css style to links. You can add a different class to all other links if you don’t want them to be affected.

---

<div class="post-metadata">

**Author:** ![aglyons](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aglyons/32/2825_2.png) [@aglyons](https://forum.mautic.org/u/aglyons)\
**Post date:** [December 23, 2021, 5:23pm UTC](https://forum.mautic.org/t/email-link-formatting-override-gmail-defaults/22095/5 "2021-12-23T17:23:50Z")

</div>

Hi Joey,

Sorry, you’re still not following.

Gmail IGNORES any styles defined in the header regarding links. No classes or ID selector CSS code is going to solve this problem. This has to be done from within Mautic.

Yes, we can change the text used in those tokens however that is a global change and would apply to all parts of an email.

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [December 27, 2021, 12:51am UTC](https://forum.mautic.org/t/email-link-formatting-override-gmail-defaults/22095/6 "2021-12-27T00:51:58Z")

</div>

Hi,

I think Gmail as well as some other mail clients are stripping tags from emails. I think what you are looking for can already be done, just with a bit different approach. For example look below:

```auto
<a href="{unsubscribe_url}" style="color:red;">Test</a>

```

Text will stay red in Gmail. Hope it helps.

Regards, M.

---

<div class="post-metadata">

**Author:** ![aglyons](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aglyons/32/2825_2.png) [@aglyons](https://forum.mautic.org/u/aglyons)\
**Post date:** [January 3, 2022, 7:01pm UTC](https://forum.mautic.org/t/email-link-formatting-override-gmail-defaults/22095/7 "2022-01-03T19:01:15Z")

</div>

Thanks all. My apologies as it never occurred to me to check for variables that I could use to manually build out those links.
