La etiqueta <iframe> permite incrustar otra página web dentro de la actual, como si fuera una ventana o marco que muestra contenido externo. Es como tener un navegador dentro de tu página.
<iframe src="https://ejemplo.com" width="600" height="400"></iframe>
src: URL del contenido que querés mostrar.
width y height: dimensiones del marco.
También podés usar title, frameborder, allowfullscreen, y loading.
Este código incrusta un video de YouTube directamente en tu página:
<iframe src="https://www.youtube.com/embed/ar6QQW_63hw" width="560" height="315" allowfullscreen></iframe>
X-Frame-Options
).lazy
= carga diferida para mejorar rendimiento).
<iframe
src="https://www.youtube.com/embed/ar6QQW_63hw"
width="560"
height="315"
title="Mejores 5 hosting GRATIS sin publicidad 2023"
frameborder="0"
allowfullscreen
loading="lazy">
</iframe>
loading="lazy"
mejora el rendimiento de tu página, especialmente si tenés varios iframes o contenido multimedia.iframe { border: none; }