HTML Uniform Resource Locators
The topic of today’s discussion is the HTML URL encode. An URL is another term for a web address.
URLs or HTML URLs can consist of words (e.g., mrexamples.com) or IP addresses (e.g., 192.68.22.30).
Names are more painless to remember than numbers, so most individuals enter their names when surfing.
URL (Uniform Resource Locator)
The URL of a page is what web browsers use to request it from a web server. On the internet, a document or data is guided to by a Uniform Resource Locator (URL) when it comes to HTML URL encode.
Here are the syntax rules for a web address like https://unminifyall.com/html/index.php:
scheme://prefix.domain:port/path/filename
Here’s why:
- A scheme indicates what service is being provided over the Internet (most common are HTTP and HTTPS).
- A domain prefix is defined as a prefix for a URL (www is the default).
- The name of the Internet domain (such as mrexamples.com) specifies the website’s address.
- A port specifies what port to use on the host (80 is the default for HTTP and 443 for HTTPS)
- Defining a path on a server (If forgotten: the site’s root directory)
- A filename is the name of a document or resource.
HTML URL encode – Schemes for URLs
Here are some common HTML url encoding schemes:
Scheme | Short for | Used for |
---|---|---|
https | Secure HyperText Transfer Protocol | Secure and encrypted web pages. |
ftp | File Transfer Protocol | Downloading or uploading files |
http | HyperText Transfer Protocol | Plain text web pages. |
file | A file on your computer |
URL Encoding
ASCII is the only character set that can be used to send URLs over the Internet. It is necessary to convert URLs containing characters outside the ASCII set.
Internet-transferable characters are encoded so that they can be transmitted as URLs. Hexadecimal digits are replaced with “%” following non-ASCII characters in URLs in HTML URL encode.
Spaces are not allowed in URLs. Spaces are usually replaced with a plus (+) sign, or %20, in URL encoding.
You can try it for yourself
Your input will be URL encoded before it is sent to the server if you click the “Submit” button.
The input you provide will be displayed on a server page.
Click Submit again with a different input.
ASCII Encoding Examples
According to your web page’s character set, your browser will encode your input and HTML5 uses the UTF-8 character set as its default.
Character | From Windows-1252 | From UTF-8 |
---|---|---|
£ | %A3 | %C2%A3 |
€ | %80 | %E2%82%AC |
© | %A9 | %C2%A9 |
® | %AE | %C2%AE |
à | %C3 | %C3%83 |
Ä | %C4 | %C3%84 |
Ã… | %C5 | %C3%85 |
à | %C1 | %C3%81 |
 | %C2 | %C3%82 |
À | %C0 | %C3%80 |
The topic regarding HTML Url Encode should now be covered in its entirety.
The URL Encoding Reference we will release shortly will serve as a comprehensive reference for all URL encodings.
Advantages of HTML URL Encode:
HTML URL encoding provides several benefits that enhance the functionality and user experience of websites. These advantages include:
- Compatibility: By encoding URLs, HTML URL encoding makes sure that URLs can be displayed on all web browsers and operating systems, resulting in consistent display across different devices.
- Security: Encoding special characters in URLs makes it difficult for hackers to execute attacks, such as cross-site scripting, thereby enhancing the security of the website.
- Reliability: HTML URL encoding avoids any data transfer errors by correctly encoding and transmitting all special characters.
- Consistency: By encoding all special characters, HTML URL encoding ensures that URLs are consistent in terms of readability and interpretation on different browsers and operating systems.
- Easy Implementation: The process of URL encoding is simple and can be implemented using several programming languages, making it easy for programmers, both novice and experienced, to use.