HTML Iframes
Learn to embed external content like videos and maps with the <iframe>
tag.
Iframes in HTML
Iframes are like windows to other web pages, allowing you to embed external content directly into your site.
The <iframe> Element
The <iframe>
tag defines an inline frame, used to embed another document within the current HTML document. It's a powerful tool for integrating third-party content.
Key Attributes: src, width, height
The most important attribute is src
, which specifies the URL of the page to embed. The width
and height
attributes control the dimensions of the iframe.
Purpose and Use Cases
Iframes are commonly used to embed content like YouTube videos, Google Maps, social media feeds, or even entire websites, providing rich interactivity without leaving the page.
Practice Zone
Interactive Test 1: Drag & Drop
Arrastra en el orden correspondiente.
Arrastra las opciones:
Completa el código:
Interactive Test 2: Fill in the Blanks
Rellena los huecos en cada casilla.
< width="560" height="315" src="..." ></>
Practice Example: Code Editor
Embed a YouTube video using the <iframe>
tag. Ensure it allows fullscreen mode and has a defined width and height.