Adscend

Click Here



Click Here



Click Here

Sunday 8 September 2013

Hyperlinks href

HTML Hyperlinks href



1.A hyperlink (or link) is a word, group of words, or Image.
The "Link text" doesn't have to be text. It can be an image or any other HTML element.
2.Hyperlink links are defined with the <a> tag.
3.Creating a text hyperlink use <a> </a> tag.
4.Text between <a> and </a> is link text which allow to user to click on it to go to destination page.
5.When you click on the hyperlink, you will jump to a specified document or a new section within the current document.
6.href indicates the URL being linked to. href makes the anchor into a link.
7.If you set the target attribute to "_blank", the link will open in a new browser window.
The target attribute specifies where to open the linked document.

The <a> tag can be used in two ways:
1.To create a hyperlink to another document, by using the href attribute
2.To create a bookmark inside a document, by using the name attribute
Syntax:
<a href="url">Link text</a>
url=> Uniform Resource Locator
The href attribute specifies the destination of a link.
Example: 1
<html>
<head>
<title>Link</title>
</head>
<body>
<a href="http://www.aspell.org">Click here to visit Aspell</a>
</body>
</html>
Output
Click here to visit Aspell

It is possible to use an image instead of text as link. To do this, replace link text between <a> and </a> with an <IMG> tag.
Example: 2
<html>
<head>
</head>
<body>
<a href ="http://Aspell.org">
<img src="button.gif"/>
</a>
</body>
</html>
Output

If you click "Next" button, you will redirect to Aspell.org web site.


To link to open a page in a new window use the target="_blank" in the <a href> tag.

<a href="http://www.aspell.org" target="_blank">Go to Aspell </a>

Note: The link address is specified in the href attribute.



No comments:

Post a Comment