Hyperlinks in HTML - Technology & Web designing

Breaking

Monday, 27 April 2020

Hyperlinks in HTML

Links in HTML :

Links are the hyper part of the hypertext - that is part that you use to jump from one document to another. Links (also called anchors) mark text or images as element that point to other HTML documents, images, applets, multimedia effects, or special places with in HTML documents.

The tag that make HTML documents active, is the anchor tag, (<A>) which inserts hyperlinks in a document. A hyperlink is a string that appears in a different colours from the reset of the text. When a mouse pointer is over a hyperlink, the pointer turns into finger, & when the mouse is clicked over the hyperlink, the browser displays the specified HTML document.

Concept of URL :

URL (pronounced U-R-ell) stands for Universal Resource Locator, which is an address of a document on the server has a unique name and thus, each has a unique address

The URL made of four basic parts :
  • The protocol : 1) http - hpertext transfer protocol. 2) ftp - file transfer protocol.
  • The Hostname : is the name of the server that holds HTML document and relative files.
  • Folder name : Indicating the folder in which files are locked.
  • Filename : Name of specific HTML document and consist of two part viz. 1) Name 2) Extension.

Types of URLs :

There are two types of URLs categories :

  • Absolute
  • Relative

Absolute - Absolute URL contains all the information to identify files on the internet.

Relative - Relative URL points to files in the same folder or on the same server.

The <A> Tag : (Anchor Tag)

Attribute : HREF, TITLE, NAME

  • HREF : This gives the location to which hyperlink points which is the URL of the page to be displayed when the anchor (or text) is clicked.
  • TITLE : The value of this attribute is displayed as tool tip text or at the bottom of the browser window, if the user points to the anchor with the mouse but doesn't click on it.

(a) Linking to Documents in the same folder :

<A HREF ="INDEX.HTML">Call College Site</A>

(b) Linking to Documents in the different folder :

<A HREF ="faculty/data/dac.html"> College Faculty</A>

(c) Linking to Documents on the web :

<A HREF ="http://www.yahoo.com">Visit Yahoo</A>

(d) Linking to a specific location in document :

<A HREF ="#Microsoft"></A>

<A HREF ="Microsoft">Details information about Microsoft</A>

(e) Inserting E- mails Links :

<A HREF ="mailto: abc@rediffmail.com">Send Feedback</A>

No comments:

Post a Comment

If you have any doubts regarding this please comment or email us.