In this article, Mytour introduces you to HTML URLs. Additionally, readers can refer to other Mytour articles to understand Character Sets in HTML.
Exploring the World of HTML URLs
Article Contents:
1. HTML URLs (Uniform Resource Locator)
2. HTML URL Schemes
3. URL Encoding
4. Examples of ASCII Encoding
1. HTML URLs (Uniform Resource Locator) in HTML
- Web browsers request pages from web servers using URLs.
- URLs (or Uniform Resource Locators) are used to address documents (or other data) on the web.
Imagine a web address, let's say Mytour, following the syntax rules below:
scheme://prefix.domain:port/path/filename
Where:
- scheme: specifies the type of Internet service (most commonly http or https).
- prefix: determines the domain prefix (default for http is www).
- domain: specifies the Internet domain name (e.g., Mytour).
- port: identifies the server port number (default for http is 80).
- path: defines the server path (if omitted, defaults to the website's root directory).
- filename: specifies the name of the document or resource.
2. HTML URL Schemes
Below is a table listing some common URL schemes:
3. URL Encoding
- URLs can be transmitted over the Internet using ASCII character encoding. If a URL contains characters outside the ASCII table, it must undergo conversion.
- URL encoding transforms non-ASCII characters into a format suitable for Internet transmission.
- URL encoding replaces non-ASCII characters with '%' followed by hexadecimal digits.
- URLs cannot contain spaces. URL encoding typically replaces spaces with either a plus sign (+) or %20.
4. Examples of ASCII Encoding
The browser will encode the input according to the character set used on your page.
The default character set in HTML5 is UTF-8.
In this article, Mytour has just introduced you to HTML URLs. Additionally, readers can explore other articles on Mytour to learn more about Layout in HTML. In the next article, Mytour will further introduce you to XHTML.