Pr.Pg Next Pg

<IFRAME></IFRAME> tag tutorials

  • The IFRAME element defines an inline frame for the inclusion of external objects including other HTML

  • documents. 

  • IFRAME provides similar functionality to OBJECT.

  • One advantage of IFRAME is that it can act as a target for other links. However, OBJECT is included in HTML 4 Strict while IFRAME is not.

  • <IFRAME>tag attributes are below:

 

Sr No

Attributes

Descriptions

1

ALIGN

This attribute specifies the alignment of an <iframe> according to surrounding elements.

2

FRAMEBORDER

This attribute specifies whether or not to display a border around an <iframe>.

3

HEIGHT

This attribute specifies the height of an <iframe>.

4

WIDTH

This attribute specifies the width of an <iframe>.

5

LONGDESC

This attribute specifies a page that contains a long description of the content of an <iframe>.

6

NAME

This attribute specifies the name of an <iframe>.

7

SRC

This attribute specifies the address of the document to embed in the <iframe>.

8

SANDBOX

This attribute enables a set of extra restrictions for the content in the <iframe>

9

SEAMLESS

This attribute specifies that the <iframe> should look like it is a part of the containing document.

10

SRCDOC

This attribute specifies the HTML content of the page to show in the <iframe>.

 

Syntax:

<body>

<iframe attribute= value>

</iframe>

</body>

 

Example: HTML program to demonstrate IFRAME

Output:
Example: HTML program to demonstrate four frames in browser and also display different web site in each frame

Output: in Chrome
Pr.Pg border                                              Next Pg