URL is Uniform Resource Locator that tells where a particular resource is located. The word uni means one and form means type. Lets take an example to understand the 5 parts of a URL.
http://makeuseofundaz.blogspot.com/2009/08/environmental-engineering-laboratory.htmlThe link mentioned above is a URL and is made up for five parts.
1. http:// : Full form of http is Hypertext Transfer Protocol which tells the browser that the information is located somewhere on the WWW ( World Wide Web)
2. www : World Wide Web tells the browser to search the particular address on Internet. If we want to search a particular resource of our local computer we will use file:/// as a protocol. I’ll explain each and every protocol later in this tutorial.
3. makeuseofundaz.blogspot.com : This is known as hostname that includes the web pages, files and folders.
4. 2009/08 : These are the folders that are hosted on the server. 2009 is the main folder that includes another folder called 08.
5. how-to-share-files-on-twitter.
Till now you are familiar with the anatomy of URLs. Lets move further and understand types of URLs. There are two types of URLs
- Absolute
- Relative
Absolute URLs are those that include all the necessary information. like the link discussed above.
Relative URLs are those that only includes file name and folder. For example;
series/htmltutorials/gagan.html
The link above does not include any hostname but contains only file name and folder name, any URL following the above pattern can be termed as relative URL.
Linking one document to another
We use anchor tag to link one document to another. We also use the hyper-reference tag (href) with anchor tag to link the files.
Syntax
http://you-file-link"> Link text
Output
Link text
Email Links
To use hyperlink as an email link, we use the mailto tag, which when clicked open the default emailing program.
Syntax
abc@xyz.com"> Click here to send us email
Output
Click here to send us email
Chart telling about different types of protocols
Protocol Syntax | Use of the protocol |
http:// | It tells the browser that the information is located somewhere on the WWW ( World Wide Web) |
file:/// | It tells the browser that the information is located somewhere in our local computer |
ftp:// | FTP ( File Transfer Protocol) It is used for documents on an FTP server |
gopher:// | It is used for documents on a Gopher server |
telnet:// | It is used to open a Telnet connection |
wais:// | This protocol is used to connect to a Wide Area Information Server |
mailto:// | Used to open default email program |
news: | It is used to connect to a newsgroup |
I know you might be confused with these protocols, do not worry I’ll be giving all the detailed information in my e-book.
No comments:
Post a Comment