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

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


 Sandbox attribute value allow-top-navigation-by-user-activation  Allows the iframe content to navigate its top-level browsing context, but only if initiated by user.


Example

<html>

<body>

<h1> Sandbox attribute Example</h1>


<iframe src="Sandbox_techthinkforu.org " 

sandbox="allow-top-navigation-by-user-activation">

</iframe>


</body>

</html>

Comments

Last 7 Days

How do you add color to a < table > in HTML?

What is img scr or image scr or scr img ?

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

How to Create a table in html with 2 rows and 3 columns (Source code )