HTMLUniform Resource Locator (URL)
URL is a web address.
URLs can be composed of letters, such as "tutorialpro.org", or an Internet Protocol (IP) address: 192.68.20.50. Most people access websites using the website domain name because names are easier to remember than numbers.
URL - Uniform Resource Locator
Web browsers request pages from Web servers using URLs.
When you click on 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 a document on the World Wide Web.
Example of a web address: http://www.tutorialpro.org/html/html-tutorial.html Syntax rules:
Explanation:
- scheme - Defines the type of Internet service. 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 tutorialpro.org.
- :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 website).
- filename - Defines the name of the document/resource.
Common URL Schemes
Here are some URL schemes:
Scheme | Access | Used for... |
---|---|---|
http | Hypertext Transfer Protocol | Ordinary web pages that start with http://. Not encrypted. |
https | Secure Hypertext Transfer Protocol | Secure web pages, encrypts all information exchange. |
ftp | File Transfer Protocol | For downloading or uploading files to websites. |
file | Files on your computer. |
URL Character Encoding
URLs can only use the ASCII character set to be transmitted over the Internet. Since URLs often contain characters outside the ASCII set, URLs must be converted to a valid ASCII format.
URL encoding uses "%" followed by two hexadecimal digits to replace non-ASCII characters.
URLs cannot contain spaces. URL encoding typically uses "+" to replace spaces.
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 and then click the submit button again.
URL Encoding Examples
Character | URL Encoding |
---|---|
€ | %80 |
£ | %A3 |
© | %A9 |
® | %AE |
À | %C0 |
Á | %C1 |
 | %C2 |
à | %C3 |
Ä | %C4 |
Å | %C5 |
For a complete URL encoding reference, visit our URL Encoding Reference.