An <iframe> with extra restrictions:
![]()
The sandbox attribute is supported in Internet Explorer 10, Firefox, Chrome, and Safari.
Note: The sandbox attribute is not supported in Internet Explorer 9 and earlier versions, or in Opera.
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.
HTML <iframe> tag
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The HTML5 Certificate documents your knowledge of advanced HTML5.
The CSS Certificate documents your knowledge of advanced CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
Your message has been sent to W3Schools.