URL 和 LINK 有什么区别?
What is the difference between a URL and a LINK?
人们谈论 URL 和 LINK 好像他们是不同的东西,但他们看起来肉眼看也是一样。
它们有什么区别?
URL 是“Uniform Resource Locator”的缩写,是
指定资源在 Internet 上的位置的地址。一种
typical URL 必须指定用于访问资源的协议,
它所在的主机的名称,以及路径
资源:
http://www.server.com/main/folder/resource.html
上面的URL表示文档resource.html
位于
Web 服务器 www.server.com
可以在路径中找到它
/main/folder
.
超链接,或简称为 Link,是:
"An element in an electronic
document that links to another place in the same document or to an
entirely different document. Typically, you click on the hyperlink to
follow the link."
这些是一些 URL:
http://example.com/
mailto:alice@example.com
https://example.com/all.css
在文档中,这些 URL 可以 linked。通常,这将允许消费者对此 URL 执行某些操作(通过单击它,或在打开文档时自动执行等),例如:
- 正在访问由 linked URL
标识的页面
- 正在向 linked 电子邮件地址发送电子邮件
- 正在下载 link
引用的样式表
在 HTML 文档(这是最流行的,但不是唯一可以包含 link 的文档格式)中,您可以(例如)使用 a
element ,它创建一个 hyperlink(又名。link),它可以有一个标签(或锚文本)您的选择,例如:
<a href="http://example.com/">This is a link.</a>
<a href="http://example.com/">http://example.com/</a>
<a href="http://example.com/">http://example.net/misleading-label</a>
<a href="mailto:alice@example.com">email me</a>
<a href="mailto:alice@example.com">alice@example.com</a>
<a href="https://example.com/all.css">A CSS file</a>
<link href="https://example.com/all.css" rel="stylesheet" />
人们谈论 URL 和 LINK 好像他们是不同的东西,但他们看起来肉眼看也是一样。
它们有什么区别?
URL 是“Uniform Resource Locator”的缩写,是 指定资源在 Internet 上的位置的地址。一种 typical URL 必须指定用于访问资源的协议, 它所在的主机的名称,以及路径 资源:
http://www.server.com/main/folder/resource.html
上面的URL表示文档resource.html
位于
Web 服务器 www.server.com
可以在路径中找到它
/main/folder
.
超链接,或简称为 Link,是:
"An element in an electronic document that links to another place in the same document or to an entirely different document. Typically, you click on the hyperlink to follow the link."
这些是一些 URL:
http://example.com/
mailto:alice@example.com
https://example.com/all.css
在文档中,这些 URL 可以 linked。通常,这将允许消费者对此 URL 执行某些操作(通过单击它,或在打开文档时自动执行等),例如:
- 正在访问由 linked URL 标识的页面
- 正在向 linked 电子邮件地址发送电子邮件
- 正在下载 link 引用的样式表
在 HTML 文档(这是最流行的,但不是唯一可以包含 link 的文档格式)中,您可以(例如)使用 a
element ,它创建一个 hyperlink(又名。link),它可以有一个标签(或锚文本)您的选择,例如:
<a href="http://example.com/">This is a link.</a>
<a href="http://example.com/">http://example.com/</a>
<a href="http://example.com/">http://example.net/misleading-label</a>
<a href="mailto:alice@example.com">email me</a>
<a href="mailto:alice@example.com">alice@example.com</a>
<a href="https://example.com/all.css">A CSS file</a>
<link href="https://example.com/all.css" rel="stylesheet" />