Integrate iFrame correctly - so it'll work
With an iFrame you can integrate any foreign content into your website. We'll tell you here how you can use it to display images, videos & more using code.
Integrate iFrame into the website
You can integrate content from other providers into your website in the iFrame. This can be, for example, a map section from Google Maps, an advertising banner from Amazon or a YouTube video.
- The code looks like this:
- Each entry starts with
- For "src =", enter the path or URL to the content that you want to display in the frame. It is important to put this address in quotes.
- You should always fill in the "name" and "title" attributes. On the one hand, the text is shown when the frame is loaded, and on the other hand, the entries serve the accessibility of online content.
- In order not to use an unsuitable standard size for the frame in your website, enter the height and the width. These values can be individually adjusted.
- Enter the attributes for height and width in relation to the website in percent or in pixels.
- If you want to play an embedded video on the whole screen, add the attribute "allowfullscreen" to the code:
- Open your website in an HTML editor.
- Place the code composed in this way at the desired position on your HTML page and save the changes.
Tip: Embed YouTube video via iFrame
- You can also simply call up the finished iFrame under the YouTube videos via "Share"> "Embed".
- If you click on "Show more", you can also modify the player elements in the iFrame.
Next, read how to embed a video with HTML as the website background.