In Association with Amazon.in   Flipkart

Saturday, November 24, 2012

HTML Page Links <a> Tag
Using anchor <a> tags we can establish the links form one page to another Page.


Syntax : <a href = " Path of HTML file">    text    </a>


Example
red.html
<body bgcolor=red text=yellow>
<Hr/>
This is  Red file
<hr/>
<body>

green.html
<body bgcolor=green text=blue>
<hr>
This is green file
<hr> <body>

Color.html (main file)
<body bgcolor=yellow>
<hr>
<a href="red.html"> Red Page  </a>   <br>
<a href="green.html"> Green Page  </a>
</body>

Target is an attribute of anchor Tag.
 Target = "_blank” Opens the target Page in new page. 
Target = "_self” Opens the target Page in same page. (It is Default ) .


Example
<html>
<head>
</head>
<body>
<a href="a.html" target="_blank"> Page A </a>   <br>
<a href="b.html" target="_self"> Page B </a>
</body>
</html>


Note : Images can also be taken as Links
Example
<html>
        <head>
        </head>
        <body>
        <a href="b.html">  <img src="sunset.jpg"   height=70 > </a>
        </dody>
</html>

No comments:

Post a Comment


Related Posts Plugin for WordPress, Blogger...