Unable to highlight text in outlook by using HTML <mark> tag

Brass Contributor

Hello, 

This is regarding a problem we are facing with the outlook email renderer.

 

 

We are sending emails using Java Email API and if we use <mark> tag to highlight a text in the email template the highlight does not appear while reading the email.

However if we use a background color to highlight the text it seems to be working.

 

Html code with mark tag : 

 

 

<!doctype html>

<html>

 <head> 

  <title></title> 

  <meta name="viewport" content="width=device-width, initial-scale=1.0"> 

 </head> 

 <body style="min-height: 245px;"> 

  <table style="margin: 0 auto; padding: 0;" width="100%" cellspacing="0" cellpadding="0" border="0"> 

   <tbody> 

    <tr> 

     <td valign="top" align="center"> 

      <table style="width: 600px; display:none !important;" cellspacing="0" cellpadding="0" border="0"> 

       <tbody> 

        <tr> 

         <td height="20"></td> 

        </tr> 

       </tbody> 

      </table> 

      <table style="width: 600px; height:auto !important;" cellspacing="0" cellpadding="20" border="0" bgcolor="#FFFFFF"> 

       <tbody> 

        <tr> 

         <td id="tableWrapperContentId" align="left"><p><mark>Hello I am Highlighted via mark tag</mark></p></td> 

        </tr> 

       </tbody> 

      </table> 

      <table style="width: 600px; height:auto !important;" cellspacing="0" cellpadding="0" border="0"> 

       <tbody> 

        <tr> 

         <td height="50"></td> 

        </tr> 

       </tbody> 

      </table></td> 

    </tr> 

   </tbody> 

  </table>

  <p>Sample text</p>  

 </body>

</html>

 

HTML code with background color : 

 

<!doctype html>

<html>

 <head> 

  <title></title> 

  <meta name="viewport" content="width=device-width, initial-scale=1.0"> 

 </head> 

 <body style="font-size: 16px; min-height: 245px;"> 

  <table style="margin: 0 auto; padding: 0;" width="100%" cellspacing="0" cellpadding="0" border="0"> 

   <tbody> 

    <tr> 

     <td valign="top" align="center"> 

      <table style="width: 600px; display:none !important;" cellspacing="0" cellpadding="0" border="0"> 

       <tbody> 

        <tr> 

         <td height="20"></td> 

        </tr> 

       </tbody> 

      </table> 

      <table style="width: 600px; height:auto !important;" cellspacing="0" cellpadding="20" border="0" bgcolor="#FFFFFF"> 

       <tbody> 

        <tr> 

         <td id="tableWrapperContentId" align="left"><p><span style="background-color: rgb(247, 218, 100);">Hello I am highlighted using background color</span></p></td> 

        </tr> 

       </tbody> 

      </table> 

      <table style="width: 600px; height:auto !important;" cellspacing="0" cellpadding="0" border="0"> 

       <tbody> 

        <tr> 

         <td height="50"></td> 

        </tr> 

       </tbody> 

      </table></td> 

    </tr> 

   </tbody> 

  </table>

  <p>Sample text</p>  

 </body>

</html>

Can someone please confirm whether Outlook ignores the <mark> tag?

The tag is not present in the list of tags ignored by outlook!

 

0 Replies