Gmail syntax for evaluating text color in nested tables for html signature

I am developing an html email signature for a client, and I found that there seems to be an error in the way other email clients display text color when the text is inside a nested table in a signature sent from gmail. Check out my sample code below.

Note that the text will always be black by default if inside a nested table.

I tried to set the text color and background color for all elements and for all elements without the ability to override this error. The only way I could get the text to be yellow is to rewrite my HTML code and not use nested tables at all.

<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#0084C9" style="background-color: #0084C9; color: #ffff00;">
  <tbody>
    <tr>
      <td style="color: #ffff00;">Text color is honoured in parent table</td>
    </tr>
    <tr>
      <td style="color: #ffff00;">
        <table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#0084C9" style="background-color: #0084C9; color: #ffff00; ">
          <tbody>
            <tr>
              <td style="color: #ffff00;">Text color is not honoured inside a nested table</td>
            </tr>
          </tbody>
        </table>
      </td>
    </tr>
  </tbody>
</table>
&nbsp;
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#0084C9" style="background-color: #0084C9; color: #ffff00;">
  <tbody>
    <tr>
      <td style="color: #ffff00;">Text color is honoured in parent table</td>
    </tr>
    <tr>
      <td style="color: #ffff00;">
        <table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#0084C9" style="background-color: #0084C9; color: #ffff00; ">
          <tbody>
            <tr>
              <td style="color: #ffff00;"><span style="color: #ffff00;">Text color is not honoured inside a nested table even inside another element</span></td>
            </tr>
          </tbody>
        </table>
      </td>
    </tr>
  </tbody>
</table>
&nbsp;
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#0084C9" style="background-color: #0084C9; color: #ffff00;">
  <tbody>
    <tr>
      <td style="color: #ffff00;">Text color is honoured in parent table</td>
    </tr>
    <tr>
      <td style="color: #ffff00;">Text color is honoured when not inside a nested table</td>
    </tr>
  </tbody>
</table>

Screenshots:

litmus screenshot for a signature sent from gmail to apple mail

+4

Source: https://habr.com/ru/post/1626105/


All Articles