About Lesson
HTML Uniform Resource Locators (URLs) are used to specify the addresses of resources on the web. URLs are the standard way to identify and access web pages, images, documents, and other resources.
A URL typically consists of several components:
- Protocol: The protocol specifies the method or protocol used to access the resource. Common protocols include “http://” for accessing web pages over HTTP, “https://” for secure web pages over HTTPS, “ftp://” for file transfers, and “mailto:” for email addresses.
- Domain: The domain or hostname represents the specific web server or website where the resource is located. For example, in the URL “https://www.example.com”, “www.example.com” is the domain.
- Path: The path refers to the specific location or directory on the server where the resource is located. It provides the hierarchical structure for organizing files on a web server. For example, in the URL “https://www.example.com/images/pic.jpg”, “/images/pic.jpg” is the path.
- Query String: The query string is an optional component that follows the path and is preceded by a question mark (?). It allows passing parameters or data to the server. Query parameters are separated by ampersands (&) and typically have a name-value pair format. For example, in the URL “https://www.example.com/search?q=keyword”, “?q=keyword” is the query string.
- Fragment Identifier: The fragment identifier is an optional component that follows a hash symbol (#). It refers to a specific section or location within a web page. The browser will automatically scroll to that section when the URL is accessed. For example, in the URL “https://www.example.com/page.html#section”, “#section” is the fragment identifier.
Here are some examples of URLs:
- https://www.example.com
- https://www.example.com/products
- https://www.example.com/search?q=keyword
- https://www.example.com/page.html#section
URLs are used in hyperlinks to navigate between web pages, display images, download files, and perform various web-related operations. Understanding the components of a URL allows you to work with and reference web resources effectively.
scheme://prefix.domain:port/path/filename
ASCII Encoding Examples
Your browser will encode input, according to the character-set used in your page.
The default character-set in HTML5 is UTF-8.
Character | From Windows-1252 | From 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 |
Join the conversation