【发布时间】:2017-05-08 04:51:31
【问题描述】:
我只是一个html的学生,我只是写了一个简单的代码来学习html.. 我有一个问题。
如果我写代码
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>html practice</title>
</head>
<body>
move to <a href=google.com" target="_blank"><strong>google</strong></a>
</body>
</html>
这个链接失效了
但是当我将代码更改为<a href="https://www.google.com" target="_blank"> 时,它工作得很好。
我不知道为什么,我很好奇..请帮帮我...
【问题讨论】:
-
你在
google.comhref=google.com"之前错过了双引号 -
是的,我错过了。但如果我纠正它,它有相同的结果
-
你至少需要我认为的协议
-
这样:
move to <a href="http://google.com" target="_blank"> -
“但是当我将代码更改为
<a href="https://www.google.com" target="_blank">时,它运行得非常好。” - 那是因为您拥有大多数浏览器所需的https://www.。
标签: html https http-status-code-404 href