URLs are also known as URLs.
URLs can consist of words such as "www.baidu.com", or Internet Protocol (IP) addresses: 192.168.1.253.
Url-uniform Resource Locator
When you click a link in an HTML page, the corresponding <a> tag points to an address on the World Wide Web.
A Uniform Resource Locator (URL) is used to locate documents (or other data) on the World Wide Web.
URLs, such as http://www.w3school.com.cn/html/index.asp, adhere to the following grammatical rules:
Scheme://host.domain:port/path/filename
Explain:
- Scheme-Defines the type of Internet service. The most common type is the HTTP
- Host-Defines the domain host (the default host for HTTP is www)
- Domain-Define Internet domain names, such as w3school.com.cn
- :p ORT-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 in the root directory of the Web site).
- FileName-Defines the name of the document/resource
URL schemes
Here are some of the most popular scheme:
URL encoding:
URLs can only be sent over the Internet using the ASCII character set.
Because URLs often contain characters outside of the ASCII collection, URLs must be converted to valid ASCII formats.
URL encoding uses a "%" followed by a two-bit hexadecimal number to replace non-ASCII characters.
The URL cannot contain spaces. URL encoding typically uses + to replace spaces.
URL Encoding Example:
HTML Resource Locator-url