an HTML attribute for the iframe tag
  1. Welcome
  2. Examples
    1. CSS
    2. iframe
    3. React
    4. Vimeo
    5. YouTube
  3. Errors
  4. Anecdotes


  1. querySelectorAll()
  2. Examples Network
  3. Questions LLC


allowfullscreen is an HTML attribute, usually used within an iframe HTML tag. It enables videos from various sources to be displayed in fullscreen mode. Without it, videos would only be visible within iframes, and that would be no fun whatsoever.

The following HTML code, when inserted into a webpage, displays a YouTube video with a fullscreen button:

<iframe src="//" allowfullscreen></iframe>

Here is what the code looks like when displayed to a user. Once the video is played, a fullscreen button is displayed in the bottom-right hand corner: