Is it ok to have an `` inside another ``?

前端 未结 4 1409
小鲜肉
小鲜肉 2020-12-20 11:22

If I had a link to another page, and another link was put inside it, would that be ok to do? Is it allowed in HTML5 and if so, which browsers support it?

Trying this

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-20 11:44

    No, you cannot nest a elements in HTML 4 or 5. The key part of the spec that clarifies this is that when an a is a link, it is interactive content, and the content model of the a is

    Transparent, but there must be no interactive content descendent

    Reference

提交回复
热议问题