what is a web address explain its types
Share
what is a web address explain its types
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Types of URL:
URLs vary depending on the location of the document to which user will link. Basically, URLs fall into two categories; Absolute and relative URL. They are described below.
(i) Absolute URL:
An absolute URL contains all the information necessary to find the files on the internet. It contains the protocol indicator, hostname, folder name and file name. Absolute URL are similar to address used by the U.S. Postal Service, which include a name, street address, apartment number, city, state and zip code. If some of the information is missing ― say, the street number or house number ― the carrier can’t deliver the mail to the right person.
Similarly, if the protocol indicator or hostname is missing from a URL, browsers can not link to a specific file because they wont know where and how to look for the file. Likewise, if the folder or file name is missing, browsers won’t know which piece of information to pull of the server. The given is an example of absolutes
(ii) Relative URLs :
A relative URL usually contains only the folder name and file name or even just the file name. We can use these partial URLs when we are pointing to a file that’s located within the same folder or on the same server as the originating file. In these cases, a browser doesn’t need the server name or the protocol indicator because it assumes the files are located in a folder or on a server that’s relative to the originating document.
User can use relative URLs to refer to documents in relation to the originating documents, which is called Document-Relative URLs or to the server on which the originating document resides, which is called Server-Related URLs.
From the given figure, when linking from index.html, we use the following URLs,