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://prog101.blogspot.com">PROG101</a>
<a href="http://prog101.blogspot.com" name="mylink1">PROG101</a>
PROG101
MYLINK
When this code is executed the text between <a> & </a>(PROG101) 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 | Description | Value |
---|---|---|
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 link | default, rect, circle, poly |
coords : | Specifies the coordinates of a link | coordinates |
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 :Jumps to MYLINK
0 comments:
Post a Comment