加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

Html:什么是正确的顺序和标签?

发布时间:2020-12-14 21:29:56 所属栏目:资源 来源:网络整理
导读:以下哪一项是否符合标准? !-- Do the links surround the target link object --a href=''pLink Description/p/a!-- or does the object type encapsulate the link--pa href=''Link Description/a/p 我知道他们的功能相同,但这是一个最佳做法/标准问题。
以下哪一项是否符合标准?
<!-- 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>标签里面有一个这样的情况:

< p>这是< a href =''>短链接的更长的句子< / a>< / p>

谢谢!

解决方法

第一个例子只允许使用HTML5。

所有版本的HTML / XHMTL都允许第二个例子。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读