Definition of URI (Uniform Resource Identifier) and URI Reference
Definition of URI
A URI is a string of characters that can be used to identify an abstract or physical resource. URIs are defined by RFC 3986. In many cases, URIs are used to identify a point of content, such as an HTML web page or a specific location within a particular web page.
A URL is one type of URI that identifies a resource, such as a web page, by its location on the Internet. A #
and fragment identifier can be appended to the URL to identify a specific point within the web page. Therefore, in HTML, values of a number of attributes are coded as URIs. When the scheme is http
or https
, the format of the URI is:
http://host.domain.tld/path/file-name.ext?query#fragment
https://host.domain.tld/path/file-name.ext?query#fragment
The initial URL part of these types of URIs identify resources that can be located and retrieved via the Internet. Note that the #fragment
is not part of the URL. According to RFC 3986 (and one of its predecessors, RFC 2396), the fragment is handled on the client (browser) side after the resource has been located and retrieved via the URL part of the URI.
Definition of URI Reference
A URI reference is either a full URI or a relative URI that will be resolved relative to a base URI. For example, in an HTML document a URI reference without a full URL part can be resolved relative to the base URL of the document.