An <iframe> shows another web page inside your page. It is how you embed YouTube videos, Google Maps and forms.
Useful attributes
src— the address of the page to show.width/height— the size of the frame.title— describes the content (important for accessibility).loading="lazy"— loads the frame only when the visitor scrolls near it (faster page).allowfullscreen— lets videos go full screen.
Many sites block being shown in iframes for security, so not every page can be embedded.
Examples
Example — Embed a YouTube video
HTML
<iframe width="360" height="203"
src="https://www.youtube.com/embed/qz0aGYrrlhU"
title="HTML tutorial video"
loading="lazy"
allowfullscreen></iframe>
Use the "embed" link from YouTube → Share → Embed.
Try it Now »
Example — Embed a Google Map
HTML
<iframe
src="https://www.google.com/maps?q=Gaya,Bihar&output=embed"
width="360" height="250" style="border:0;"
title="Map of Gaya" loading="lazy"></iframe>