This page is a tutorial on html “iframe” tag. “Iframe” can be used to embed another page's content in the current page, and it can also be used for a scrollable window inside a window.
“iframe” IS supported in html5. 〔☛ HTML5 Tags〕 Here's a iframe sample:
Here's the code:
<iframe src="some.html" width="200" height="300"></iframe>
If you are using {HTML 4.01 transitional, XHTML 1.1 transitional}, you can use “iframe”, like this:
<iframe src="some.html" longdesc="iframe_longdesc.html" width="200" height="200" align="top" frameborder="1" scrolling="auto"> For browsers that doesn't support iframe, this content is displayed. </iframe>
| Attributes | Values |
|---|---|
| SRC | source url |
| NAME | a name string for the frame |
| LONGDESC | a url |
| WIDTH | pixels |
| HEIGHT | pixels |
| ALIGN | One of: top, middle, bottom, left, right |
| FRAMEBORDER | 1 or 0 |
| MARGINWIDTH | pixels |
| MARGINHEIGHT | pixels |
| SCROLLING | yes, no, auto |
“Iframe” tag is not supported in HTML 4.01 Strict nor XHTML 1.1 Strict, but all browsers supports it anyway. To be absolutely correct, you can use “object” tag. See: HTML: using “Object” tag for “Iframe”.