我正在努力变得完整<figure>
元素作为链接,所以我写了这些代码行:-
<figure>
<a href="#">
<img src="images/product-image.jpg" alt="image " />
<span class="label"><span class="rotate">40%</span></span>
<span class="curle-label_bg"></span>
<figcaption><span class="product-brand">Brand of product</span>
Main Caption here
<span class="save-money">Save 395.05</span>
<span class="product-price">€169.30</span>
</figcaption>
</a>
</figure>
我收到错误“在此上下文中,元素Figcaption 不允许作为元素a 的子元素。
(抑制该子树的进一步错误。)” in http://validator.w3.org/,我已将文档类型更改为 HTML5(实验性)“更多选择”,任何人都可以告诉我为什么我会收到此错误或我哪里出错了?
From the spec:
可以使用该元素的上下文:
作为图形元素的第一个或最后一个子元素。
您正在尝试将其用作<a>
not a <figure>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)