HTML-LINKS
The link is used to jump into another part of a current document or into another web page.
The link may be a word or an image.
The tag used to crate a link is Anchor tag.
Syntax:
<a>--------------------</a>
Attributes of <a> tag:
href
name
Target = "_blank", "_self", "_Top", "_Parent".
id
char set
access key
tab index
rel
1. href:
Attribute "href" is used to navigate or jump into another web document.
Syntax:
<a href="url"> text </a>
Example:
<a href="www.google.com">Click here for Google</a>
2. name:
Attribute "name" is used navigate or jump within a page , document.
Syntax:
<a name="title"> text </a>
Example:
<a name="top">Top Section</a>
<a href="#tips">Go to top</a>
3. Target:
Attribute target defines how the new link should open. For the value _blank -it will open in a new window. For _self - it will open in the same window.
Syntax:
<a href="link" target="_____"> click here </a>
Example:
<a href ="www.google.com" target="_blank"> Click here for google search </a>
An image as a link
We can also use an image as a link.
Syntax:
<a href="URL" > <img src="URL alt="name"></a>
Example:
<a href="www.google.com"><img src="search.JPEG" alt="search"></a>