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

Example:

<A HREF =http://www.infomaxacademy.com 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.


CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz