HTML Uniform Resource Locators

URL is also known as a web address.

URL can be composed of words, such as “codew3c.com”, or an Internet Protocol (IP) address: 192.168.1.253. Most people type in the domain name of the website when surfing the internet because names are easier to remember than numbers.

URL - Uniform Resource Locator

When you click a link on an HTML page, the corresponding <a> tag points to an address on the World Wide Web.

Uniform Resource Locator (URL) is used to locate documents (or other data) on the World Wide Web.

Website address, such as http://www.codew3c.com/html/index.asp, follows the following syntax rules:

scheme://host.domain:port/path/filename

Explanation:

  • scheme - Defines the type of Internet service. The most common type is http
  • host - Defines the domain host (the default host for http is www)
  • domain - Defines the Internet domain, such as codew3c.com
  • :port - Defines the port number on the host (the default port number for http is 80)
  • path - Defines the path on the server (if omitted, the document must be located in the root directory of the website).
  • filename - Defines the name of the document/resource

Editor's Note:The English full name of URL is Uniform Resource Locator, and it is also translated as 'Uniform Resource Locator' in Chinese.

URL Schemes

The following are some of the most popular schemes:

Scheme Access Used for...
http Hypertext Transfer Protocol Normal web pages starting with http://. Not encrypted.
https Secure Hypertext Transfer Protocol Secure Web Page. Encrypts all information exchanges.
ftp File Transfer Protocol Used to download or upload files to the website.
file   Files on your computer.