An inline frame is marked up as follows:
![]()
The <iframe> tag is supported in all major browsers.
The <iframe> tag specifies an inline frame.
An inline frame is used to embed another document within the current HTML document.
HTML5 has some new attributes, and some HTML 4.01 attributes are not supported in HTML5.
Tip: Use CSS to style the <iframe> (even to include scrollbars).
New : New in HTML5.
| Attribute | Value | Description |
|---|---|---|
| frameborder | 1 0 |
Not supported in HTML5 |
| height | pixels | Specifies the height of an iframe |
| longdesc | URL | Not supported in HTML5 |
| marginheight | pixels | Not supported in HTML5 |
| marginwidth | pixels | Not supported in HTML5 |
| name | name | Specifies the name of an iframe |
| sandboxNew | "" allow-forms allow-same-origin allow-scripts allow-top-navigation |
Enables a set of extra restrictions for the content in the iframe |
| scrolling | yes no auto |
Not supported in HTML5 |
| seamlessNew | seamless | Specifies that the iframe should look like it is a part of the containing document |
| src | URL | Specifies the address of the document to embed in the iframe |
| srcdocNew | HTML_code | Specifies the HTML content of the page to show in the iframe |
| width | pixels | Specifies the width of an iframe |
The <iframe> tag also supports the Global Attributes in HTML5.
The <iframe> tag also supports the Event Attributes in HTML5.
| WEB HOSTING |
|---|
| Best Web Hosting |
| PHP MySQL Hosting |
| Best Hosting Coupons |
| UK Reseller Hosting |
| Cloud Hosting |
| Top Web Hosting |
| $7.95/mo SEO Hosting |
| Premium Website Design |
| WEB BUILDING |
|---|
| Download XML Editor |
| FREE Website BUILDER |
| Free Website Templates Free CSS Templates |
| Make Your Own Website |
| W3SCHOOLS EXAMS |
|---|
|
Get Certified in: HTML, CSS, JavaScript, XML, PHP, and ASP |
| W3SCHOOLS BOOKS |
|---|
|
New Books: HTML, CSS JavaScript, and Ajax |
| STATISTICS |
|---|
|
Browser Statistics Browser OS Browser Display |
| SHARE THIS PAGE |
|---|