Press "Enter" to skip to content

Anchor Tag Examples in HTML

Last updated on October 4, 2019

Anchor tag:

  • Anchor tag is a tag which is meant for transferring the control to the specific location on clicking of the content.

Program :

<html>

     <body link=”blue” alink=”red” vlink=”cyan”>

                      <h1>

                                     <center>

                                                      <a href=”Lighthouse.jpg” target=”_blank”> A </a>

                                                </center>

                                </h1>

                </body>

</html>

  • _self by default display same page
  • _parent by display complete browser
  • _blank to display it,s open separate tab to display.

Sample Example in Anchor tag:

Program 1 :

<html>

     <frameset rows=”20%,60%,20%” bordercolor=”red” frameborder=”1″>

                    <frame src=”a.html” noresize/>

                                   <frameset cols=”30%,70%” bordercolor=”red” frameborder=”1″>

                                         <frameset rows=”*,*,*,*” bordercolor=”red” frameborder=”1″>

                                                                     <frame src=”ra1.html” noresize/>

                                                                                 <frame src=”ra2.html” noresize/>

                                                                                 <frame src=”ra3.html” noresize/>

                                                                                 <frame src=”ra4.html” noresize/>

                                                                 </frameset>

                                                  <frame name=”sss” src=”display1.html” noresize/>

                                                </frameset>

                                <frame src=”b.html” noresize/>

                </frameset>

</html>

Home1.html:

<html>

    <body>

                    <h1>

                                    <center> kkar technologies </center>

                                </h1>

                </body>

</html>

Address1.html :

<html>

    <body>

                    <h1>

                                    <center> kkar technologies, electronic city phase2, bangalore </center>

                                </h1>

                </body>

</html>

Courses1.html :

<html>

    <body>

                    <h1>

                                    <center> java,python,meanstack </center>

                                </h1>

                </body>

</html>

Company1.html :

<html>

    <body>

                    <h1>

                                    <center> HCL,Infosys, Wipro </center>

                                </h1>

                </body>

</html>

Display1.html :

<html>

    <body>

                    <h1>

                                    <center> Display </center>

                                </h1>

                </body>

</html>

Ra1.html :

<html>

     <body link=”red” alink=”yellow” vlink=”green”>

                     <h1>

                                     <center>

                                                     <a href=”home1.html” target=”sss”> Home </a>

                                                 </center>

                                 </h1>

                 </body>

</html>

Ra2.html :

<html>

     <body link=”green” alink=”yellow” vlink=”red”>

                     <h1>

                                     <center>

                                                     <a href=”address1.html” target=”sss”> Address </a>

                                                 </center>

                                 </h1>

                 </body>

</html>

Ra3.html :

<html>

     <body link=”green” alink=”yellow” vlink=”red”>

                     <h1>

                                     <center>

                                                     <a href=”courses1.html” target=”sss”> Courses </a>

                                                 </center>

                                 </h1>

                 </body>

</html>

Ra4.html:

<html>

     <body link=”green” alink=”yellow” vlink=”blue”>

                     <h1>

                                     <center>

                                                     <a href=”company1.html” target=”sss”> Companies </a>

                                                 </center>

                                 </h1>

                 </body>

</html>

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *