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

前端 未结 4 1408
小鲜肉
小鲜肉 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

    According to the W3C specification for links HTML4: No.

    Links and anchors defined by the A element must not be nested; an A element must not contain any other A elements.

    Or, in HTML5 spec:

    Links are a conceptual construct, created by a, area, and link elements, that represent a connection between two resources.

提交回复
热议问题