根据标准,以下哪一项(如果有的话)是正确的?
<!-- Do the links surround the target link object -->
<a href=''><p>Link Description</p></a>
<!-- or does the object type encapsulate the link-->
<p><a href=''>Link Description</a></p>
我知道它们的功能相同,但这是一个最佳实践/标准问题。这也适用于 ul/ol。
我认为赞成的唯一原因<a>
里面的tag是这样的情况:
<p>This is a longer sentence with a <a href=''>short link here</a></p>
Thanks!
第一个示例仅在 HTML5 中允许。
第二个示例在所有版本的 HTML/XHTML 中都允许。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)