Creating Hyperlink in HTML


Hyperlinks :

Hyperlink refers to the text that is linked to other web page. Hyperlink may provide link to any resource on the web including HTML page, an image, a sound file, a movie, etc.

<a> :

To create hyperlinks <a> is used.
The value of href attribute should be the URL where the linked page is located.
For eg.,
<a href="http://blogging-hacks.blogspot.com">Blogging Hacks</a>
<a href="http://blogging-hacks.blogspot.com" name="mylink1">MYLINK</a>
Output :

When this code is executed the text between <a> & </a>(Blogging Hacks) becomes a hyperlink & when user clicks on its, he gets desired web page.
<a> tag can be used with name attribute to mark specific hyperlink.
It has the following attributes:
Attributes DescriptionValue
href : URL of the page where the desired page is located. URL
name : This attribute is used for linking within the same page.link_name
target: Value for this attribute can be name of the frame where web page will open after click or values can be of the following type:
_blank - the target URL will open in a new window ,
_self - the target URL will open in the same frame as it was clicked,
_parent - the target URL will open in the parent frameset,
_top - the target URL will open in the full body of the window.
framename, _blank, _parent, _self, _top
shape :Specifies the shape of a linkdefault, rect, circle, poly
coords :Specifies the coordinates of a linkcoordinates

Linking within same page :

See the following eg. that jumps over the above link we have created. Just click following Link.
<a href="#mylink1">Jumps to MYLINK</a>
Output :

You Might Also Like

0 comments

My photo
Hi. I am Ramesh Wetkoli. Three things I try to include in my blog posts are creativity, useful insights, and trendy information. IT graduate and working professional. I have leveraged 9+ years of work experience in IT industry and learnt various technologies, providing merchandizing support and handling digital marketing responsibilities.

Find us on Facebook