html iframe tag

html iframe tag

html iframe tag is a special kind of frame which is developed by microsoft corporation. Instead of frames, it is placed as a seperate box in the the window. In other words, it floats in the window. You can place it anywhere in the webpage, even at the center.

html iframe tag

The Inline Frame, can be using <IFRAME> element. It's closing </IFRAME> is optional. The text can be enclosed in this element. This text is only displayed when your browser does not support inline frames. The contents that are to be specified in seperate HTML page. This page can be included using the SRC attribute. Thus , the URL of the webpage whose contents are to be included in inline frame.

For example--
                       <IFRAME SRC="A.HTML"> Hello world </IFRAME>

It has some following attributes--

  • Height-- The height attribute is used to specify the height of the inline frame. This value can be given in pixels forms or percentage form.
For example--
                    <IFRAME SRC="A.HTML" HEIGHT="200">Hello </IFRAME>

  • WIDTH-- The width attribute is used to specify the width of the inline frame. This value can be given in pixels form or in percentage form.
For example--
                      <IFRAME SRC="B.HTML" WIDTH="60%">Hello</IFRAME>

  • Align-- The align attribute is used to specify the location of inline frame with respect to the browser's window. The possible values are Left, right and center. By default, it is value is left.
For example--
                      <IFRAME SRC="C.HTML" ALIGN="CENTER">Hello</IFRAME>

Like,if we want to display the red color in a seperate window then first we have to create a file which includes red color and then by using iframes we can display it within the seperate window.

For example--
                                                                  HTML CODE:

html iframe tag

OUTPUT:

html iframe tag
So in this way, we got the red color in seperate window.
If you want to know more about frames then click on the below link--

Post a Comment

0 Comments