HTML uniform Resource Locator
URL is a web address.
URL can consist of letters, such as “runoob.com”, or the Internet Protocol (IP) address: 192.68.20.50. Most people go to the website and use the domain name of the site to visit, because names are easier to remember than numbers.
URL-uniform Resource Locator
The Web browser requests a page from the Web server through URL.
When you click a link on the HTML page, the corresponding <a>
the label points to an address on the World wide Web.
A uniform Resource Locator (URL) is used to locate documents on the World wide Web.
scheme://host.domain:port/path/filename
Description:
scheme
-define the type of Internet service. The most common type is httphost
-define domain hosts (the default host for http is www)domain
-define Internet domain names, 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 in the root directory of the site).filename
-define the name of the document / resource
Common URL Scheme
Here are some URL scheme:
Scheme |
Visit |
For. |
---|---|---|
Http |
Hypertext transfer protocol |
An ordinary web page that begins with http://. No encryption. |
Https |
Secure Hypertext transfer Protocol |
Secure web page, encrypt all information exchange. |
Ftp |
File transfer protocol |
Used to download or upload files to the website. |
File |
The files on your computer. |
URL character coding
URL can only use the ASCII
character set to be sent over the Internet. Because URL often contains ASCII
characters outside the collection, URL must be converted to a valid ASCII
format.
URL encoding replaces non-hexadecimal numbers with “%” followed by two digits ASCII
characters.
URL cannot contain spaces. URL coding is usually used +
to replace spaces.
Online instance
If you click the submit button below, the browser will URL the input before sending it. The page on the server displays the input received.
Try typing some characters, and then click the submit button again.
URL coding example
Character |
URL coding |
---|---|
€ |
80 |
£ |
% A3 |
© |
% A9 |
® |
% AE |
Include |
% C0 |
Á |
% C1 |
Sch |
% C2 |
Use |
% C3 |
Ye |
% C4 |
AUBG |
% C5 |