HTML Uniform Resource Locator URL, htmlurl
URL-Uniform Resource Locator
A URL can consist of words, such as "w3school.com.cn", or an Internet Protocol (IP) address: 192.168.1.253. When surfing the Internet, most people enter the Domain Name of the website because the name is easier to remember than the number.
Syntax Rules:
scheme://host.domain:port/path/filename
Explanation:
- Scheme-defines the internet service type. The most common type is http.
- Host-defined domain host (the default http host is www)
- Domain-Defines Internet domain names, such as w3school.com.cn
- : Port-defines the port number on the host (the default http port number is 80)
- Path-defines the path on the server (if omitted, the document must be in the root directory of the website ).
- Filename-defines the document/Resource Name
URL Schemes
Here are some of the most popular scheme:
Scheme |
Access |
Used... |
Http |
Hypertext Transfer Protocol |
A common webpage starting with http. Not encrypted. |
Https |
Secure Hypertext Transfer Protocol |
Secure Web page. Encrypt all information exchanges. |
Ftp |
File Transfer Protocol |
Used to download or upload files to a website. |
File |
|
URL Encoding
URL encoding converts characters into formats that can be transmitted over the Internet.
URLs can only be sent over the Internet using the ASCII character set.
Because the URL usually contains characters other than the ASCII set, the URL must be converted to a valid ASCII format.
The URL encoding uses "%" followed by two hexadecimal numbers to replace non-ASCII characters.
The URL cannot contain spaces. The URL encoding usually uses + to replace spaces.
URL encoding example
Character |
URL Encoding |
€ |
% 80 |
£. |
% A3 |
© |
% A9 |
® |
% AE |
À |
% C0 |
Á |
% C1 |
 |
% C2 |
Bytes |
% C3 |
Ä |
% C4 |
Bytes |
% C5 |
For complete URL encoding references, visit our URL encoding reference manual.