Computer >> Computer tutorials >  >> Programming >> HTML

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>