Search code examples
htmlcssmailto

Intermittent failure of Mailto: attribute in HTML code


<div class="transeffect">
 <span style="font-size:1.5em;padding-top:7px;color:red" class="glyphicon glyphicon-envelope"><a href"mailto:someone@example.com"> &nbsp;someone@example.com</a></span>
</div>

The above code is not working. But in another part of the document, I have this

<p><span class="glyphicon glyphicon-envelope" aria-hidden="true"></span> <a style="text-decoration:none" href="mailto:someone@example.com">someone@example.com</a></p>

This code works perfectly. Help please. Thanks.


Solution

  • That's because you're missing the '=' between href and the mailto url in the first snippet. The second snippet is okay.