What is HTML Frames

The <frame> tag defines one particular window (frame) within a <frameset>.
Each <frame> in a <frameset> can have different attributes, such as border, scrolling, the ability to resize, etc.
With frames, you can display more than one HTML document in the same browser window.
Each HTML document is called a frame, and each frame is independent of the others.

The disadvantages of frames are

  • The web developer must keep track of more HTML documents
  • It is difficult to print the entire page

The HTML Frameset Element

The frameset element holds two or more frame elements. Each frame element holds a separate document.

The frameset element states only HOW MANY columns or rows there will be in the frameset.

The HTML Frame Element

The <frame> tag defines one particular window (frame) within a frameset.

In the example below we have a frameset with two columns.

The first column is set to 30% of the width of the browser window. The second column is set to 70% of the width of the browser window. The document "frame_a.htm" is put into the first column, and the document "frame_b.htm" is put into the second column:

(How to create a Frameset)

<frameset cols="30%,70%">
<frame src="frame_a.htm" />
<frame src="frame_b.htm" />

Frameset and frame tag are removed in HTML5.


Iframe is a inline frame used to embedd other document within iframe

(How to create a iframe)

    <iframe src="http://www.techaltum.com"></iframe>

(How the HTML code above looks in a browser)

New window inside Iframe

(How to create a iframe)

        <iframe name="frame1" ></iframe>
        <a href="link1.html" target="frame1">Link 1</a>
        <a href="link2.html" target="frame1">Link 2</a>
        <a href="link3.html" target="frame1">Link 3</a>
        <a href="link4.html" target="frame1">Link 4</a>

(Iframe use also get a new window)

Click on Images Below

Use Iframe to show location on Google Map

(Iframe Use to Show Google Map)

(Iframe is also used to play youtube video on your website using EMBED Code)