Spot the difference  URL VS URI

Spot the difference URL VS URI

uri-vs-url.png URL(Uniform Resource Locator) known as the address of a website is a reference for a resource and a way to access that resource

structure of a URL

protocol://[hostname]path[?query][#fragment]

While

URI(Uniform Resource Identifier) is a way to identify a resource. Unlike the URL, the Uniform Resource Identifier doesn't necessarily provide the means to locate the resource

To summarize it, the URL is a subset of a URI, ( that is to say, URL is a URI with a way to access that resource), another example of a URI is an ISBN. ( The International Standard Book Number is a numeric commercial book identifier that is intended to be unique. )

URIURL
Uniform Resource IdentifierUniform Resource Locator
superset of URL that identifies a resourcesubset of URI that specifies where a resource exists and the mechanism for retrieving it
the main aim of URI is to find a resource.The main aim of URL is to get the location or address of a resource
URI in used in HTML, XML and other files.URL is used to locate only web pages,
Example urn:isbn:0-486-27557-4.Example 'kasasira.pages.dev'