HTML Uniform Resource Locators
A URL is a web page address.
A URL can consist of letters, such as “tutorialsbyte.com”, or an Internet Protocol (IP) address: 192.68.25.51.
Most people use the website domain name to access the website, because the name is easier to remember than the number.
URL – Uniform Resource Locator
A web browser requests a page from a web server through a URL.
When you click 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 documents on the World Wide Web.
An example of a web page address: https://www.tutorialsbyte.com/html/html-tutorial/ Grammar rules:
scheme :// host.domain : port / path / filename
Illustrate:
- 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 tutorialsbyte.com
- :port – defines the port number on the host (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 | for… |
---|---|---|
http | Hypertext Transfer Protocol | Normal 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 or upload files to a website. |
file | files on your computer. |
URL character encoding
URLs can only use the ASCII character set .
to send 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 a two-digit hexadecimal number to replace non-ASCII characters.
The URL cannot contain spaces. URL encoding usually uses + to replace spaces.
URL Encoding Example
Character | URL Editing |
---|---|
€ | %80 |
£ | %A3 |
© | %A9 |
® | %AE |
À | %C0 |
Á | %C1 |
 | %C2 |
à | %C3 |
Ä | %C4 |
Å | %C5 |
For a complete URL encoding reference, visit our URL Encoding Reference Manual .