HTML Home
HTML Tags Reference
Selected Reading
© 2011 TutorialsPoint.COM
|
HTML <iframe> tag
Function:
The HTML <iframe> tag is used to create an inline frame.
Difference between HTML and XHTML:
NONE
Example:
<iframe src ="/htm/index.htm" width="100%"></iframe>
|
This will produce following result:
Online Practice:
To Become more comfortable - Do Online Practice
Attributes:
Attribute | Value | Description |
align | left right bottom top middle | Specifies how to align the iframe according to the surrounding text |
frameborder | 0 or 1 | Specifies whether or not to display border around the frame. |
height | pixels or % | Specifies the height of the inline frame. |
longdesc | URL | A URL to a long description of the frame contents. |
marginheight | pixels | Allows you to specify the width of the space between the left and right of the frame's borders and the frame's content. The value is given in pixels. For example marginwidth="10". |
marginwidth | pixels | Specifies the margin, in pixels, between the frame's contents and it's left and right margins. |
name | frame name | Name of the frame |
scrolling | yes no auto | Determines scrollbar action |
src | URL | Location of the frame contents file |
width | pixels or % | Specifies the width of the inline frame. |
Standard Attributes:
Attribute | Description |
class | Document wide identifier |
id | Document wide identifier |
title | Specifies a title to associate with the element. |
style | Helps to include inline casecadubf style sheet. |
|
|
|