Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML URL

HTML Uniform Resource Locators (Uniform Resource Locators)


A URL is a web page address.

A URL can consist of letters, such as "runoob.com", or an Internet Protocol (IP) address: 192.68.20.50. Most people access websites using the domain name, because names are easier to remember than numbers.


URL - Uniform Resource Locator

A Web browser requests pages from a Web server through a 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) is used to locate documents on the World Wide Web.

An example of a web page address: http://www.runoob.com/html/html-tutorial.html Syntax rules:

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

Note:


Common URL Schemes

Here are some URL schemes:

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

URL Character Encoding

URLs can only use ASCII Character Set.

to be sent over the Internet. Since URLs often contain characters outside the ASCII set, a URL must be converted into a valid ASCII format.

URL encoding replaces non-ASCII characters with a "%" followed by two hexadecimal digits.

URLs cannot contain spaces. URL encoding usually replaces spaces with +.


Online example

If you click the "Submit" button below, the browser will URL-encode the input before sending it. The page on the server will display the received input.

Try entering some characters, then click the submit button again.


URL Encoding Example

Character URL Encoding
€ %80
£ %A3
© %A9
® %AE
À %C0
Á %C1
 %C2
à %C3
Ä %C4
Å %C5

For a complete URL encoding reference, please visit our URL Encoding Reference Manual。