HTML URL
HTML Uniform Resource Locators
URL is a web page address.
URL can consist of letters, such as "php.cn", or Internet Protocol (IP). Most people access the website using the website domain name because Names are easier to remember than numbers.
URL - Uniform Resource Locator
The web browser requests the page from the web server through the URL.
When you click a link in an HTML page, the corresponding tag points to an address on the World Wide Web.
A Uniform Resource Locator (URL) used to locate documents on the World Wide Web.
Description:
scheme - Define Internet services type. The most common type is http
host - defines the domain host (the default host for http is www)
domain - defines the Internet domain name, such as runoob.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
Common URL Scheme
The following are some URL schemes:
Scheme | Access | for... |
---|---|---|
http | Hypertext Transfer protocol | Ordinary web pages starting with http://. No encryption. |
https | Secure Hypertext Transfer Protocol | Secure web page, encrypts all information exchanged. |
ftp | File Transfer Protocol | is used to download or upload files to a website. |
file | A file on your computer. |
URL Character Encoding
URL can only be sent over the Internet using the ASCII character set.
. Because URLs often contain characters outside the ASCII set, the URL must be converted to valid ASCII format.
URL encoding uses "%" followed by two hexadecimal digits to replace non-ASCII characters.
URL cannot contain spaces. URL encoding usually uses + to replace spaces.
URL encoding example
Characters | URL encoding |
---|---|
€ | %80 |
£ | %A3 |
© | %A9 |
® | %AE |
À | %C0 |
Á | %C1 |
 | %C2 |
à | %C3 |
Ä | %C4 |
%C5 |
URL Encoding Reference Manual.