Definition of URL (Uniform Resource Locator)

A URL is a string of characters that identifies a resource, such as a web page, by its location on the Internet. The format of a URL that uses the HTTP protocol to retrieve a resource is:

http://host.domain.tld/path/file-name.ext?query

When the scheme at the beginning of the URL is https instead of http, the resource is retrieved over a secure (SSL) connection.

One difference between a URL and a URI with the HTTP protocol is that there is no #fragment in a URL. According to RFC 3986 (and one of its predecessors, RFC 2396), a URL is one type of URI that identifies a resource. By appending a fragment identifier to a URL, a URI can be used to identify a specific point of content within that resource.

Whether the resolved value of a URI reference should be a URL or a URI depends more on the type of resource being referenced than where it is coded. For example, two-dimensional images don't have placemarks to scroll to a particular place in the image, therefore the value of the <img src> attribute should resolve to a URL. In the future, however, the <audio src> and/or <video src> attributes might allow skipping to a placemark (time code) in a media resource.

Note that the HTML 5 specification defines the term URL different from the standard definition of URL, as indicated by the specification itself:

Note: The term "URL" in this specification is used in a manner distinct from the precise technical meaning it is given in RFC 3986. Readers familiar with that RFC will find it easier to read this specification if they pretend the term "URL" as used herein is really called something else altogether. This is a willful violation of RFC 3986.