HTML iFrame allowfullscreen

HTML iFrame allowfullscreen

Last Updated Jul 21, 2015, 12:00:06 PM

HTML iframe allowfullscreen enables videos from various sources to be displayed in fullscreen mode. Without it, videos would only be visible within iframes

This attribute can be set to true if the frame is allowed to be placed into full screen mode by calling its element.mozRequestFullScreen() method. If this isn't set, the element can't be placed into full screen mode.

Property values

Type: Boolean

True when the attribute is present, false when missing.

The following HTML code displays a YouTube video with a fullscreen button when inserted into a web page:

Try It Now
  • The HTML parser treats markup inside iframe elements as text.
  • The allowFullscreen IDL attribute must reflect the allowfullscreen content attribute.

Browser Support
allowfullscreen 17 (webkit) 9.0(moz) Not Supported (Yes) 7 (webkit) 7 (webkit) ?

Sources and Credits

The source of the content has been referred and updated with Mozilla Foundation and w3C

Last Updated Jul 21, 2015, 12:00:06 PM