A hyperlink (or link) is a word, group of words, or image that you can click on to jump to a new document or a new section within the current document.
When you move the cursor over a link in a Web page, the arrow will turn into a little hand.
Links are specified in HTML using the <a> tag.
The <a> tag can be used in two ways:
- To create a link to another document, by using the href attribute
- To create a bookmark inside a document, by using the name attribute
The href attribute defines reference that the link refers to. Basically this is where the user will be taken if they wish to click this link.
Hypertext references can be Internal, Local, or Global.
- Internal - Links to anchors on the current page
- Local - Links to other pages within your domain
- Global - Links to other domains outside of your site
he HTML code for a link is simple. It looks like this:
<a href="urlwebsitename">Text Link here</a>
Example:
<a href="http://www.hiscript.com/">Learn Online Tutorial</a>
The target attribute defines whether to open the page in a separate window, or to open the link in the current browser window.
Example:
target=
"_blank" Opens new page in a new browser window
_self" Loads the new page in current window
_parent" Loads new page into a frame that is superior to
where the link lies
_top" Loads new page into the current browser window,
cancelling all frames