电子邮件模板HTML图像未出现在Gmail中

时间:2014-03-26 09:28:04

标签: html css email gmail email-templates

刚刚为gmail创建了一个电子邮件模板

这是我的HTML代码。

 <!doctype html>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>dance</title>
 </head>

 <body>
 <table style="background-color: #ffffff; border-collapse:collapse;border-spacing: 0;margin:0 auto;" border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
     <tr>
         <td>
             <table align="center" border="0" cellpadding="0" cellspacing="0">
                 <tr>
                     <td><a href="http://www.xxx.net.au/" title="title"><img src="images/top_logo_03.png" alt="title" width="657" height="252" border="0" style="display:block"/></a></td>
                </tr>
                </table>

                </td>
                </tr>
   <tr>
                     <td><a href="http://www.xxx.net.au/" title="title"><img src="images/top_logo_03.png" alt="title" width="657" height="252" border="0" style="display:block"/></a></td>
                </tr>
                </table>

                </td>
                </tr>
         <tr>
                     <td><a href="http://www.xxx.net.au/" title="title"><img src="images/top_logo_03.png" alt="title" width="657" height="252" border="0" style="display:block"/></a></td>
                </tr>
                </table>

                </td>
                </tr>
                </table>
                </body>
                </html>

它只显示1张图像而其他图像没有显示..

需要帮助我做错了什么?

6 个答案:

答案 0 :(得分:1)

如果您仔细看到代码,请在此处发布;最后一张图片应该在表格内,但它只有一个结束标记</table>。布局中缺少<table>开放标记。

答案 1 :(得分:1)

您是否尝试过提供完整的网址(即http://<your_site_url>/images/top_logo_03.png)而不是images/top_logo_03.png

请检查此代码。

 <table style="background-color: #ffffff; border-collapse:collapse;border-spacing: 0;margin:0 auto;" border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
    <tr>
     <td>
        <table align="center" border="0" cellpadding="0" cellspacing="0">
             <tr>
                 <td><a href="http://www.xxx.net.au/" title="title"><img src="images/top_logo_03.png" alt="title" width="657" height="252" border="0" style="display:block"/></a></td>
            </tr>
        </table>
     </td>
    </tr>
    <tr>
     <td>
        <table align="center" border="0" cellpadding="0" cellspacing="0">
             <tr>
                 <td><a href="http://www.xxx.net.au/" title="title"><img src="images/top_logo_03.png" alt="title" width="657" height="252" border="0" style="display:block"/></a></td>
            </tr>
        </table>
     </td>
    </tr>
    <tr>
     <td>
        <table align="center" border="0" cellpadding="0" cellspacing="0">
             <tr>
                 <td><a href="http://www.xxx.net.au/" title="title"><img src="images/top_logo_03.png" alt="title" width="657" height="252" border="0" style="display:block"/></a></td>
            </tr>
        </table>
     </td>
    </tr>
</table>

答案 2 :(得分:1)

您需要将图像放在服务器上

<a href="http://www.xxx.net.au/" title="title"><img src="http://www.yourserver.com/images/top_logo_03.png" alt="title" width="657" height="252" border="0" style="display:block"/>

Luiggi

答案 3 :(得分:1)

如果检查代码,表结构不正确。对于第一行图像,您添加了表的结束标记。对于第2行和第3行图像,存在</table>的额外标记,这给出了不显示这些图像的错误。 HTML代码如下所示。

<!doctype html>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>dance</title>
 </head>

 <body>
 <table style="background-color: #ffffff; border-collapse:collapse;border-spacing: 0;margin:0 auto;" border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
    <tr>
        <td>
            <table align="center" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td>
                        <a href="http://www.xxx.net.au/" title="title"><img src="images/top_logo_03.png" alt="title" width="657" height="252" border="0" style="display:block"/></a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="http://www.xxx.net.au/" title="title"><img src="images/top_logo_03.png" alt="title" width="657" height="252" border="0" style="display:block"/></a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <a href="http://www.xxx.net.au/" title="title"><img src="images/top_logo_03.png" alt="title" width="657" height="252" border="0" style="display:block"/></a>
                    </td>
                </tr>
            </table>
        </td>
    </tr>

</table>
</body>
</html>

答案 4 :(得分:0)

你的代码错了:试一试:

<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>dance</title>
   </head>
   <body>
      <table style="background-color: #ffffff; border-collapse:collapse;border-spacing: 0;margin:0 auto;" border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
         <tr>
            <td>
               <table align="center" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                     <td><a href="http://www.xxx.net.au/" title="title"><img src="images/top_logo_03.png" alt="title" width="657" height="252" border="0" style="display:block"/></a></td>
                  </tr>
               </table>
            </td>
         </tr>
         <tr>
            <td><a href="http://www.xxx.net.au/" title="title"><img src="images/top_logo_03.png" alt="title" width="657" height="252" border="0" style="display:block"/></a></td>
         </tr>
      <tr>
         <td><a href="http://www.xxx.net.au/" title="title"><img src="images/top_logo_03.png" alt="title" width="657" height="252" border="0" style="display:block"/></a></td>
      </tr>
      </table>

   </body>
</html>

你错放了一些标签

答案 5 :(得分:0)

首先查看代码,您可以看到表结构不正确。尝试纠正它。
其次,您已经为图像使用了相对路径。尝试使用图像的绝对路径 对于Ex- 而不是<img src="images/xyz.gif: />,请使用<img src="http:""www.example.com/images/xyz.gif">