Using The HTML Tag to Create Inline Frames : Here's How

Using The HTML Tag to Create Inline Frames : Here's How

The <iframe> creates inline frame, which embeds an independent HTML document into the current document.

Code Example

<iframe width="560" height="315" src="youtube.com/embed/owsfdh4gxyc" frameborder="0" allowfullscreen></iframe>

Good (and terrible) used for <iframe>

There are some legitimate uses for <iframe>, and mimicking terrible design patterns from the 1990s is not one of them.Here are a few:

• Embedding third-party media

• Embedding your own media in a document-agnostic way

• Embedding code examples (we do it on this site)

• Embedding third party "applets" like payment forms

And here are some terrible used for <iframe>

• Photo gallery

• Forum or Chan

Basically-- if you need to embed some independant, already-existing HTML document into the current documen,use an <iframe>. If you are building all of it from scratch together , there is almost no good reason to break a page design into several independent documents, especially if they aren't actually independent pieces of content.