How to use sandbox attribute value ( allow-top-navigation) with < iframe > tag in HTML ? with example

 How to use sandbox attribute value ( allow-top-navigation) with < iframe >  tag in HTML ? with example 


Sandbox attribute value ( allow-top-navigation) Allows the iframe content to navigate its top-level browsing context.


Example

<html>

<body>

<h1>The iframe sandbox attribute Example</h1>


<iframe src="tech.thinkforu.org" 

sandbox="allow-scripts">


</iframe>

</body>

</html>

Comments

Last 7 Days

How to use referrerpolicy Attribute value (strict-origin ) with < iframe > tag in HTML ? with example