锚标记关闭后如何阻止文本被单击?

问题描述 投票:1回答:2

我不知道如何真正解释它,但是每当我使用下面的锚标记时,最后一个元素仍然带有下划线并且可以单击。我是一个初学者,所以我非常确定为什么会这样,我什至看过视频以了解如何删除该链接,但是我不知道该如何描述更多。

<body>
<a href = "www.google.com </a>"
 <p class= "Google"> Google </p>
 <p> The website above is google. </p>
</body>
</html>```
![End Result](https://imgur.com/a/DTCo99i)
html anchor
2个回答
0
投票

尝试一下:

<body>
    <a href="www.google.com">
      <p class="google"> Google </p>
    </a>
    <p> The website above is google. </p> 
</body>

0
投票

您的代码中有错字。以下是正确的版本。

<body>
<a href="www.google.com">Google</a>
 <p> The website above is google. </p>
</body>
</html>
© www.soinside.com 2019 - 2024. All rights reserved.