Creating Links in HTML

Creating Links in HTML

Web pages are linked to one another through Hypertext Links. Section of text or image in the HTML document can be linked to an external document or to a specific place within the same document. The text or image that provides such linkage is known as Hypertext or Hotspot. HTML provides <A>Anchor Tag to create links. The format of using anchor tag is as follows:

<A HREF ="URL"> Make Me The Link </A>

HREF (Hyper Link Reference) is a mandatory attribute used to refer the URL of the resource. URL (Uniform Resource Locator) is an address tells the browser about the file to link to. It identifies file locations (Addresses) on the web or on the local hard drive. These addresses can be those of HTML documents or elements such as images, scripts, applets and other files. It is always enclosed in quotes.

Attribute of <a> tag:

Target: it is used to specify the location of page where linked data will be open/ display. The possible values are: ‘new’, ‘_blank’, ‘self’, ‘parent’. Default target is set as ‘self’.

Name: to define the name of link by which we can bookmark the location and can jump to this location. Linking a text to a web site / an external document


<A HREF = target= “_blank”>Link to Website of Infomax Academy</A>

In the above example the link text “Links to Home page of infomax academy” would appear underlined and in a color different from any other text in the document to distinguish a link from normal text. Also you would find that the mouse pointer changes into a hand like symbol when taken over the hyperlink.

Html : Creating Links in HTML Program List