Practical Exercise 19: Internal Page Iframe
Learn how to insert an internal page within another using the <iframe> tag.<iframe>in HTML. This practical exercise will teach you how to effectively and systematically integrate internal content into your website.
Activity
Insert one HTML page within another using<iframe>
Solution with complete HTML code
Create an HTML document with the following code:
index.html
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<title>Iframe</title>
</head>
<body>
<h1>Página con Iframe</h1>
<iframe src="page.html" width="600" height="400"></iframe>
</body>
</html>
Within the same folder, create another file to use as an internal page.
page.html
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<title>Iframe - Página interna</title>
</head>
<body>
<h1>Mi página interna de ejemplo.</h1>
</body>
</html>