Linking to and from inline frames is just like linking to and from regular frames.
Here is a plain vanilla link...
Click on it and it loads the page in the inline frame. Here is the iframe code...
<iframe src="hello2.html" width="240" height="120"> This page uses inline frames. </iframe>
And here is the link code...
Go to <a href="https://www.htmliseasy.com/">HTMLisEasy.com</a>
Now, to open that same link in the full browser window, we add target="_top" to the link...
Go to <a href="https://www.htmliseasy.com/" target="_top">HTMLisEasy.com</a>
To open the link in a new browser window, use target="_blank"...
Go to <a href="https://www.htmliseasy.com/" target="_blank">HTMLisEasy.com</a>
Let's suppose you wanted a link in the main window to open in the inline frame? Well, first you have to name the inline frame...
<iframe src="hello.html" width="240" height="120" name="joesframe">
This page uses inline frames.
</iframe>
Then target a link...
Go to <a href="https://www.htmliseasy.com/" target="joesframe">HTMLisEasy.com</a>
Try it...
Go to HTMLisEasy.com
Now, because you learn by doing, I have an exercise for you...
Make a page with two inline frames. Give that page a colored background and make your iframes borderless. The document in the first iframe contains a link to Google and a link to HTMLisEasy.com. The link to Google opens in the other iframe. The link to HTMLisEasy opens in the full browser window.
Frames Tutor |
Lessons: Intro 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
Frames Templates HTML 4.0 Reference Barebones HTML Guide |
![]() |