English 中文(简体)
W3C验证错误
原标题:W3C validation error

线路

<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>

当我验证页面时,由CMS生成的会抛出几个错误。

1) 属性构造错误

2) 找不到开始标记img行的末尾

在这两种情况下都指示“php”的“p”。

它使用Firefox插件进行验证,而不是在W3C在线验证器中进行验证。

有什么建议吗?我很困惑。

最佳回答

如果要将该片段验证为XHTML,则必须在class=“f-p”src=“之间插入一个空格

问题回答

您是否将php代码粘贴到验证器中?如果是这样,您的firefox插件将进行验证,因为它正在解析html,但w3c验证器将失败,因为它不会解析php。

测试这一点的最佳方法是在浏览器中单击“查看源代码”,将该html复制粘贴到w3c验证器中,看看它是否有效。

如果真的发生了,一切都很好。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签