SyntaxStudy
Sign Up
HTML The iframe allow Attribute
HTML Intermediate 4 min read

The iframe allow Attribute

The allow Attribute

The allow attribute controls the iframe's access to browser APIs like camera, microphone, geolocation, and fullscreen.

Grant only the specific permissions the embedded content actually needs.

Example
<!-- Video call embed needs camera and microphone -->
<iframe
  src="https://meet.example.com/room"
  allow="camera; microphone; fullscreen"
></iframe>

<!-- Payment widget -->
<iframe
  src="https://pay.example.com"
  allow="payment"
></iframe>
Pro Tip

The allow attribute is the Permissions Policy for iframes — always use least privilege and only grant what is needed.