Difference between uri and url

Source: Internet
Author: User

Difference between uri and url

Uri

Unified Resource Identifier. The value is any character that uniquely identifies the resource, such as guid.

Url

A uniform resource locator. The value is a string that identifies the resource, but contains positioning information, such as http: // localhost/index.html.


URI and URL are different

(URI and URL definitions are omitted)
The difference is that URI defines a resource, and URL not only defines this resource, but also how to find this resource.

For example, on a server, the absolute address (absolute path) to a folder/Webpage is URI.
Not to mention the URL.

The more specific the differences between url uri href src, the better.

My understanding: the url is a uniform resource locator. in HTML, It is a data type that is tied to attributes such as length and color. SRC is an attribute of the image element. This attribute is used to define the path of the img. Href is also an attribute of Element A, which defines the link direction. Therefore, URLs can only be href and src values, but cannot be replaced. For example, in <a href = "#12345"> ert </a>, #12345 is a uri, and in www.sina.com is a urL. the difference between URI and URL is that URI defines a specific resource. For example, img often defines a file: www.sina.com/logo.gif.

Hope to help you.
References: Baidu

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.