Blog, news, announcement and more!

 That weird style issue in Outlook/Office365

email client tricks

When find an A tag without the HREF or with an empty HREF or an HREF with the value “#” then it will get very upset and will remove the link tag.

This is a known bug documented by the great “email hacker” Rémi Parmentier*

<!DOCTYPE html>
<html xmlns=""><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<body style="font-size: 30px;">

<a style="color: red; background-color: yellow;"></a>
<p>A paragraph</p>
<p>Second paragraph with no style</p>
<p style="">Third paragraph with style</p>
<p style="">Fourth paragraph with style</p>


So we are not surprised our link is not red on yellow, but look at how renders the “Third paragraph” for the previous code: moving styles

It sounds like an almost “random” element in the page will get the styles once belonging to your “unlinked” link.

Our tests proved that the element is not “random” (of course) but it is the first following (in the DOM traversing) element with a “STYLE” attribute.

So, this is just another reason to stay away from empty links.

(*) We suggest you Rémi’s latest post about weird bugs

... do you want to help improve this content? ... View revision history Edit