|
|
HTML iframe Tag
The information on this page is based on HTML version 4.01 (which is the current version of HTML). The next version, HTML 5, is currently being written. Here's a list of HTML 5 tags.
The HTML iframe tag is used to specify an inline frame.
An inline frame allows you to embed another document within the current HTML document. You use the iframe src attribute to specify the source of the other document, as well as other attributes to determine the height, width, scrolling properties, border etc.
| Example |
<iframe src="/pix/milford_sound/milford_sound_t.jpg"
width="200"
height="150"
scrolling="auto"
frameborder="1">
<!--This bit is only viewed by browsers that don't support inline frames -->
Your browser doesn't support inline frames.
</iframe>
The above code produces the following inline frame:
|
| Attributes: |
| Attributes specific to this tag: |
| Attribute | Description |
| name | Assigns a name to a frame. This is useful for loading contents into one frame from another. |
| longdesc | A long description - this can elaborate on a shorter description specified with the title attribute. |
| width | Specifies the width of the inline frame. |
| height | Specifies the height of the inline frame. |
| Other Attributes: |
| Attribute | Description |
| class | Document wide identifier. |
| id | Document wide identifier |
| title | Specifies a title to associate with the element. Many browsers will display this when the cursor hovers over the element (similar to a "tool tip"). |
| style | Inline style (CSS) |
| src | Location of the frame contents (for example, the HTML page to be loaded into the frame). |
| scrolling | Whether the frame should be scrollable or not (i.e. should scrollbars appear). Possible values:auto: This value means that scrollbars should appear on the frame, only if the contents of the framed page are too big to fit inside the frameyes: Scrollbars should always appear on the frame, regardless of the size of its contentsno: Scrollbars should not appear, even if the contents are too big for the frame
|
| frameborder | Whether the frame should have a border or not. Possible values:1: The frame should have a border0: The frame should not have a border
|
| marginwidth | Specifies the margin, in pixels, between the frame's contents and it's left and right margins. |
| marginheight | Specifies the margin, in pixels, between the frame's contents and it's top and bottom margins. |
| align | For alignment. Possible values:
left: Text is rendered flush left
center: Text is centered
right: Text is rendered flush right
justify: Text is justified to both margins
|
|
Also see the HTML 5 version of HTML tags
Enjoy this website?
- Add this page to your Favorites
- Link to this page (copy/paste into your own website or blog):
- Help support Quackit by making a donation
Oh, and thank you for supporting Quackit!
|
|