简体   繁体   English

W3C验证错误

[英]W3C validation error

The line 线

<a class="product_image" href="http://www.symposiumwines.com/shop/product.php?id_product=11" >
<img class="f-p"src="/shop/img/p/11-53-home.jpg" height="115" width="115" alt="Saint-Aubin 1er Cru &#039;Les Frionnes&#039; 2004"/>
</a>

generated by a CMS throws a couple of errors when I validate the page. 当我验证页面时,由CMS生成的错误会引发几个错误。

1) Attributes construct error 1)属性构造错误

2) Couldn't find end of Start Tag img line 2)找不到开始标签img行的结尾

indicating the "p" of "php" in both cases. 在两种情况下都表示“ php”的“ p”。

It does validate using the Firefox plug-in, it does not validate in the W3C validator online. 它确实使用Firefox插件进行验证,而不是在线W3C验证器中进行验证。

Any suggestion? 有什么建议吗? I am baffled. 我感到困惑。

如果要将此片段验证为XHTML,则必须在class="fp"src="之间插入一个空格

Are you pasting your php code into the validator? 您是否将PHP代码粘贴到验证器中? If so, your firefox plugin will validate because it's parsing the html, but the w3c validator will fail because it won't parse php. 如果是这样,您的firefox插件将因为正在解析html而进行验证,但是w3c验证器将因为无法解析php而失败。

The best way to test this is to click "view source" in your browser, copy paste that html to the w3c validator and see if that validates. 对此进行测试的最佳方法是在浏览器中单击“查看源代码”,将html复制粘贴到w3c验证程序,然后查看它是否有效。

If it does, everything is fine. 如果可以,一切都很好。

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

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