HTML URL Encode

What\’s a URL?

Uniform Resource Locator is what URL stands for. It is a website address. The words (javatpoint.com) or an Internet Protocol (IP) address (195.201.68.81) can be part of a URL. But most people use URLs with words instead of numbers because it\’s easier to remember.

How to write a URL:

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

Here,

  • The scheme is used to tell what kind of Internet service it is (most common is http or https).
  • the prefix is a  domain\’s name is given by its prefix (default for http is www).
  • The domain is used to describe the name of an Internet site (like javaTpoint.com).
  • Port tells the host what port number to use (default for http is 80).
  • The path is used to tell the server what a path is (If omitted: the root directory of the site).
  • The name of a document or resource is set by its filename.

Here is a list of some of the most common URL schemes:

  • http: Common web pages that use the HyperText Transfer Protocol. Not a secret.
  • https (Secure HyperText Transfer Protocol):Secure web pages. Encrypted.
  • File Transfer Protocol, or ftp, is a way to download or upload files.
  • file: A file on your computer.

 

URL Encoding

URL encoding is used to turn non-ASCII characters into a format that can be used over the Internet, since a URL is only sent over the Internet using the ASCII character set. If a URL contains characters outside the ASCII set, the URL has to be converted.

  • In URL encoding, the non-ASCII characters are replaced with a \”%\” followed by hexadecimal digits.
  • URLs cannot contain spaces. URL encoding normally replaces a space with a plus (+) sign, or %20.

 

Following is a list of some character sets which are encoded by browser after submitting the text.

CharacterFrom Windows-1252From UTF-8
%80%E2%82%AC
£%A3%C2%A3
©%A9%C2%A9
®%AE%C2%AE
À%C0%C3%80
Á%C1%C3%81
Â%C2%C3%82
Ã%C3%C3%83
Ä%C4%C3%84
Å%C5%C3%85
Related Article
Introduction to HTML

HTML Introduction – Learn the Basics of HTML HTML is the starting point of web development. Every website you see Read more

What is HTML

What Is HTML – Complete Beginner Explanation HTML is the foundation of the web. Every website you visit, from simple Read more

HTML Basic Examples

HTML Basic Examples – Learn HTML by Practice The best way to learn HTML is by writing and testing simple Read more

HTML text Editors

HTML Text Editors – Learn How to Write HTML Code To write HTML code, you need a text editor. A Read more

HTML Tags

HTML Tags are the basic units used to create HTML elements.They define how content is displayed in a web browser. Read more

HTML Elements

HTML Elements are the building blocks of every web page.Each element defines a part of the webpage, such as headings, Read more

HTML Attributes

HTML Attributes provide additional information about HTML elements.They help control how elements behave, display, or store extra data. In this Read more

HTML Headings

HTML Headings are used to define titles and subtitles on a web page.They help organize content and improve readability for Read more