index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Secure Iframe Embedding</title>
</head>
<body>
<h2>Secure Iframe Embedding (Google Maps & Video)</h2>
<!-- Responsive Iframe Container -->
<div style="max-width: 600px; aspect-ratio: 16/9;">
<iframe
src="https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ"
title="Demonstration Video Player"
width="100%"
height="100%"
style="border: none; border-radius: 8px;"
loading="lazy"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>
</div>
<!-- Sandboxed Widget -->
<h3>Sandboxed Third-Party Widget</h3>
<iframe
src="https://example.com/widget"
title="Interactive Community Widget"
sandbox="allow-scripts allow-forms"
width="300"
height="200"
style="border: 1px solid #cbd5e1;">
</iframe>
</body>
</html>