An <iframe> displays another web page inside the current one. It is commonly used for maps, videos and widgets.
src: the URL to show.width/height: the frame size.title: a description for screen readers.
Embed another web page inside your page.
✍️ 3 exercises + code challenge in this lessonAn <iframe> displays another web page inside the current one. It is commonly used for maps, videos and widgets.
src: the URL to show.width / height: the frame size.title: a description for screen readers.Mastering HTML Iframes helps you write clean and reliable HTML code. Follow standard conventions, test edge cases, and keep logic simple. Try running the code example below and complete the exercises to build confidence.
<h3>An embedded map</h3>
<iframe
src="https://www.openstreetmap.org/export/embed.html?bbox=73.0,33.65,73.15,33.75&layer=mapnik"
width="400" height="250" style="border: 1px solid #CBD5E1;"
title="Map of Islamabad"></iframe>
Check what you learned in “HTML Iframes”.
Embed another page.
< src="https://example.com" width="400" height="300"></>
What does an <iframe> do?
Add an iframe with the title "Map" that is 300 pixels wide.
Free sign-in required · Google login available
Stuck on something?
Ask the community in the CodesInTech forum.
Need a developer?
Learning on your own is great — and when you need professional help, our team builds custom software, websites and mobile apps for clients worldwide.
Explore Our Services