Iframe

An iframe is a segment of a webpage that embeds content sourced from another webpage, effectively creating a “page within a page” scenario. Primarily, iframes are utilized to integrate content from third-party sources into a website. For instance, they can be employed to display banner advertisements from platforms like Google Ads. It’s important to note that iframes differ from framesets, also known as “frames,” which were employed in earlier internet days to simplify page layouts and ensure consistent navigation.

Example

An example of an iframe is embedding a YouTube video onto a webpage using an iframe tag with the video’s URL as the source. This allows the video to be displayed and played directly within the webpage without visitors needing to navigate to YouTube.