Horje
How to create HTML Iframe - Target for a Link

An iframe can be used as the target frame for a link.


Full Example of Iframe - Target for a Link

The target attribute of the link must refer to the name attribute of the iframe:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>
<h2>Iframe - Target for a Link</h2>
<iframe src="https://itupto.com" name="iframe_a" height="300px" width="100%" title="Iframe Example"></iframe>
<p><a href="https://itupto.com" target="iframe_a">Itupto.com</a></p>
<p>When the target attribute of a link matches the name of an iframe, the link will open in the iframe.</p>
</body>
</html>

Output should be:

Full Example of Iframe - Target for a Link





Category :
Web Tutorial
Sub Category :
HTML Iframes
Uploaded by :
Admin


Read Article
https://horje.com/learn/1434/reference