The <iframe> tag allows you to embed another webpage, video, or resource within your current page. It acts like a window to another site.
<iframe src="https://example.com" width="600" height="400"></iframe>The src attribute sets the embedded page’s URL. Width and height control its visible size.
src – The URL of the page to embedwidth / height – Size of the iframetitle – Accessibility descriptionloading="lazy" – Delays loading until iframe scrolls into viewallowfullscreen – Enables full-screen capability for mediaTo embed a YouTube video, use the /embed/ format and optionally allow full-screen:
<iframe width="560" height="315"
src="https://www.youtube.com/embed/dQw4w9WgXcQ"
title="YouTube video"
frameBorder="0"
allowfullscreen
loading="lazy">
</iframe>title attribute for accessibilitysandbox to restrict iframe behavior (e.g., scripts, forms)referrerpolicy="no-referrer" for privacy<iframe src="https://trusted.com" sandbox referrerpolicy="no-referrer"></iframe>Embed a YouTube video with:
allowfullscreen enabledloading="lazy" enabled<iframe width="560" height="315"
src="https://www.youtube.com/embed/dQw4w9WgXcQ"
title="Embedded YouTube Video"
allowfullscreen
loading="lazy">
</iframe>Ask the AI if you need help understanding or want to dive deeper in any topic