The iframe tag indicates that a separate small page
can be opened on the page; some hyperlinks can be set under the iframe, and the content of the hyperlinks can be displayed on this small page;
- Use the name attribute to define a name in the iframe tag
- Set the target attribute to the name of the iframe tag in the a tag below
Code:
<iframe src="打个招呼.html" name="frame"></iframe>
<ul>
<li><a href="早安.html" target="frame">早安</a></li>
<li><a href="午安.html" target="frame">午安</a></li>
<li><a href="晚安.html" target="frame">晚安</a></li>
</ul>
effect: