An iframe with extra restrictions:
![]()
The sandbox attribute is currently supported in Chrome and Safari.
If specified as an empty string (sandbox=""), the sandbox attribute enables a set of extra restrictions for the content in the inline frame.
The value of the sandbox attribute can either be an empty string (all the restrictions is applied), or a space-separated list of pre-defined values that will REMOVE particular restrictions.
The sandbox attribute is new in HTML5.
| Value | Description |
|---|---|
| "" | Applies all restrictions below |
| allow-same-origin | Allows the iframe content to be treated as being from the same origin as the containing document |
| allow-top-navigation | Allows the iframe content to navigate (load) content from the containing document |
| allow-forms | Allows form submission |
| allow-scripts | Allows script execution |
An
<iframe> sandbox allowing form submission
Enable a set of extra restrictions, but allow form submission.
An
<iframe> sandbox allowing scripts and access to server content
Enable a set of extra restrictions, but allow scripts and access to server content.
HTML5 <iframe> tag
| WEB HOSTING |
|---|
| Best Web Hosting |
| PHP MySQL Hosting |
| Best Hosting Coupons |
| UK Reseller Hosting |
| Cloud Hosting |
| Top Web Hosting |
| $3.98 Unlimited Hosting |
| Premium Website Design |
| WEB BUILDING |
|---|
| Download XML Editor |
| FREE Website BUILDER |
| Best Website Templates Top CSS Templates |
| CREATE HTML Websites |
| EASY WEBSITE BUILDER |
| 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 |
|---|