简体   繁体   English

验证服务-电子邮件验证失败

[英]Validation Service - Unsuccessful validation for Email message

I'm trying to create an Email HTML template using XHTML document. 我正在尝试使用XHTML文档创建电子邮件HTML模板。 I was trying to test the document using "Markup Validation Service" but without success. 我试图使用“标记验证服务”来测试文档,但没有成功。 I got 2 errors and I was trying to figure it out and did some changes but it doesn't fix. 我遇到2个错误,我试图找出原因并进行了一些更改,但并没有解决。

This is my code: 这是我的代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>Welcome</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Lato" />
</head>
<body style="margin: 0; padding: 0;">
 <table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
   <td>
     <table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border-collapse: collapse; border: 1px solid #cccccc;">
       <tr>
         <td align="center" bgcolor="#70bbd9" style="padding: 2px 2px 2px 2px;">
          <img src="img/coffee2.jpg" alt="Welcome to Cricket" width="600" height="400" style="display: block;" />
         </td>
       </tr>
       <tr>
         <td bgcolor="#ffffff" style="padding: 10px 30px 20px 30px;">
           <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
             <td style="padding: 10px 0 20px 0; font-family:lato; line-height: 140%;">
              We're so happy!!!
              <br/>
              We founded this because we wanted to create a trustworthy app.
             </td>
            </tr>
            <tr>
             <td>
               <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                 <td width="260" valign="top">
                  <table border="0" cellpadding="0" cellspacing="0" width="100%">
                   <tr>
                    <td>
                     <img src="img/testimonial-bg.jpg" alt="" width="100%" height="140" style="display: block;" />
                    </td>
                   </tr>
                   <tr>
                    <td style="padding: 10px 0 0 0; font-family:lato; line-height: 140%;">
                     <h4>Extension</h4>
                     <a href="http://www.google.com"><button style="margin:33px 0 0 15px;color: black;padding: 15px 32px;text-align: center;text-decoration: none;display: inline-block;
    font-size: 14px; background-color: Transparent;
    background-repeat:no-repeat;
    border: 1px solid black;
    cursor:pointer;overflow: hidden;outline:none;">GET THE EXTENSION</button></a>
                    </td>
                   </tr>
                  </table>
                 </td>
                 <td style="font-size: 0; line-height: 0;" width="20">
                  &nbsp;
                 </td>
                 <td width="260" valign="top">
                  <table border="0" cellpadding="0" cellspacing="0" width="100%">
                   <tr>
                    <td>
                     <img src="img/technology-1940695_1920.jpg" alt="" width="100%" height="140" style="display: block;" />
                    </td>
                   </tr>
                   <tr>
                    <td style="padding: 10px 0 0 0; font-family:lato;line-height: 140%;">
                    <h4>Application</h4>
                     <a href="http://www.google.com"><button style="margin:10px 0 0 50px;color: black;padding: 15px 32px;text-align: center;text-decoration: none;display: inline-block;
    font-size: 16px; background-color: Transparent;
    background-repeat:no-repeat;
    border: 1px solid black;
    cursor:pointer;overflow: hidden;outline:none;">GET THE APP</button></a>
                    </td>
                   </tr>
                  </table>
                 </td>
                </tr>
               </table>
             </td>
            </tr>
           </table>
         </td>
       </tr>
       <tr>
         <td bgcolor="#363940" style="padding: 30px 30px 30px 30px;">
           <table border="0" cellpadding="0" cellspacing="0" width="100%">
             <td width="90%" style="font-family:lato; color:#ffffff;">
              &reg; Copyright &copy; 2017 <br/>
             </td>
             <td align="right">
              <table border="0" cellpadding="0" cellspacing="0">
               <tr>
                <td style="font-size: 0; line-height: 0;" width="20">&nbsp;</td>
                <td>
                 <a href="http://www.facebook.com/">
                  <img src="img/fb.gif" alt="Facebook" width="38" height="38" style="display: block;" border="0" />
                 </a>
                </td>
               </tr>
              </table>
             </td>
            </table>
         </td>
       </tr>
     </table>
   </td>
  </tr>
 </table>
</body>
</html>

What am I missing ? 我想念什么? Thank you. 谢谢。

The Markup Validation Service says: 标记验证服务说:

Line 84, Column 70: document type does not allow element "td" here; 第84行,第70栏:此处文档类型不允许元素“ td”; assuming missing "tr" start-tag 假设缺少“ tr”开始标签

A <td> must be inside of a <tr> . <td>必须在<tr>

<table>
  <tr>
    <td></td>
  </tr>
</table>

This is the HTML. 这是HTML。

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Welcome</title> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Lato" /> </head> <body style="margin: 0; padding: 0;"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td> <table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border-collapse: collapse; border: 1px solid #cccccc;"> <tr> <td align="center" bgcolor="#70bbd9" style="padding: 2px 2px 2px 2px;"> <img src="img/coffee2.jpg" alt="Welcome to Cricket" width="600" height="400" style="display: block;" /> </td> </tr> <tr> <td bgcolor="#ffffff" style="padding: 10px 30px 20px 30px;"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td style="padding: 10px 0 20px 0; font-family:lato; line-height: 140%;"> We're so happy!!! <br /> We founded this because we wanted to create a trustworthy app. </td> </tr> <tr> <td> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="260" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td> <img src="img/testimonial-bg.jpg" alt="" width="100%" height="140" style="display: block;" /> </td> </tr> <tr> <td style="padding: 10px 0 0 0; font-family:lato; line-height: 140%;"> <h4>Extension</h4> <a href="http://www.google.com"> <button style="margin:33px 0 0 15px;color: black;padding: 15px 32px;text-align: center;text-decoration: none;display: inline-block; font-size: 14px; background-color: Transparent; background-repeat:no-repeat; border: 1px solid black; cursor:pointer;overflow: hidden;outline:none;"> GET THE EXTENSION </button> </a> </td> </tr> </table> </td> <td style="font-size: 0; line-height: 0;" width="20"> &nbsp; </td> <td width="260" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td> <img src="img/technology-1940695_1920.jpg" alt="" width="100%" height="140" style="display: block;" /> </td> </tr> <tr> <td style="padding: 10px 0 0 0; font-family:lato;line-height: 140%;"> <h4>Application</h4> <a href="http://www.google.com"> <button style="margin:10px 0 0 50px;color: black;padding: 15px 32px;text-align: center;text-decoration: none;display: inline-block; font-size: 16px; background-color: Transparent; background-repeat:no-repeat; border: 1px solid black; cursor:pointer;overflow: hidden;outline:none;"> GET THE APP </button> </a> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td bgcolor="#363940" style="padding: 30px 30px 30px 30px;"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="90%" style="font-family:lato; color:#ffffff;"> &reg; Copyright &copy; 2017 <br /> </td> <td align="right"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td style="font-size: 0; line-height: 0;" width="20">&nbsp;</td> <td> <a href="http://www.facebook.com/"> <img src="img/fb.gif" alt="Facebook" width="38" height="38" style="display: block;" border="0" /> </a> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </body> </html> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM