
An internet resource’s unique location can be found using a string of characters called a URL, or Uniform Resource Locator. It functions as an address for any internet resource, including files, photos, videos, and web pages.
Here is an example URL you can refer:
https://www.example.com/page.html?query=example#section
Typically, a URL is made up of the following parts:
Protocol: This represents the protocol (e.g., “http://” or “https://” for web pages, “ftp://” for file transfers, or “mailto:” for email addresses) that was used to access the resource. (From above URL: “https://”)
Domain Name: This indicates precisely where the resource is located on the internet. It could be an IP address (like “192.0.2.1”) or a name that can be read by humans (From above URL: “www.example.com”).
Port (Advanced): If a specific port—such as “:8080″—is used to serve the resource, it is indicated after the domain name.
Path: This indicates the precise location or path to the filesystem resource on the server. It has many directories and filenames and begins with a forward slash (“/”). (From above URL: “/path.html”)
Request Parameters (Not Required): These are extra parameters that have been added to the URL and are divided by question marks (“?”). They are employed to change the resource’s behavior or send data to the server. (From above URL: “query=example”)
Fragment Identifier (Optional): This designates a particular section or anchor inside the resource; a hash symbol (“#”) is typically used to indicate this.(From above URL: “#section”)
To Rephrase: “https://www.example.com/page.html?query=example#section”
- Protocol: “https://”
- Domain Name: “www.example.com”,
- Path: “/page.html”
- Request Parameter: “query=example”
- Fragment Identifier: “section”
When combined, these elements enable web browsers and users to find and access resources on the internet.
Happy Coding (- <)