Enable an extra set of restrictions for the content in an <iframe> in HTML?



Use the sandbox attribute to enable an extra set of restrictions for the content in an <iframe> in HTML.

Example

You can try to run the following code to implement sandbox attribute −

<!DOCTYPE html>
<html>
   <body>
      <iframe src = "new.htm" sandbox>
         <p>Your browser does not support iframes.</p>
      </iframe>
   </body>
</html>
Updated on: 2020-06-01T08:49:32+05:30

13 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements