How to Use Iframes Inside DIV

By Bobson St. Pierre

Iframes and DIV tags are used to create divisions within a web page. An iframe is used to insert a web page within another web page. Iframes are often used to embed RSS feeds, contact forms and online applications. DIV tags are also used to create divisions within a web page. DIV tags are often used in conjunction with CSS style sheets and offer a lot of flexibility when it comes to formatting content. DIV tags can also serve as container objects for elements such as iframes. Inserting iframes within DIV tags is simple and takes just a few steps to follow.

Step 1

Open Notepad or your favorite text editing program.

Step 2

Type or copy and paste the following code:

The preceding code defines a DIV section on the Web page: myDiv by using the open
tags. It then defines an iframe inside the DIV by using the opening
  • Javascript Kit: Embedding a document inside another using the