> > How to target a link to an inframe in HTML

How to target a link to an inframe in HTML

Posted on Monday 13 August 2012 | No Comments

This is an easy trick for how to target a link to an <iframe> in HTML. This is done by targeting link to the id of the iframe. See how you can do so.



<a href="http://google.com/" target="theframe">Google</a>
<a href="http://yahoo.com/" target="theframe">Yahoo</a>
<a href="http://amazon.com/" target="theframe">Amazon</a>

 <iframe src="http://google.com/" id="theframe"></iframe>

All you need to do is to put the id of the iframe in the target attribute and the links clicked will redirect to the specific URL on the iframe which has the id provided in target attribute of the links.

Leave a Reply

Powered by Blogger.