Limited supportUse with care and provide a fallback when broad support matters.

Overview

The fullscreen API makes a specific element fill the whole screen and hides most browser UI. It is most useful when native HTML semantics or browser capabilities can replace custom implementation work.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
71
12
64
16.4
71
16.4
HTML attribute
allowfullscreen
38
12
18
10.1
38
12
DOM API

The Document method exitFullscreen() requests that the element on this document which is currently being presented in fullscreen mode be taken out of fullscreen mode, restoring the previous state of the screen. This usually reverses the effects of a previous call to Element.requestFullscreen().

71
79
64
16.4
71
16.4
exitFullscreen (returns promise)

Returns a `Promise`

69
79
64
16.4
69
16.4

The fullscreenchange event is fired immediately after the browser switches into or out of fullscreen mode.

71
79
64
16.4
71
16.4

The Document.fullscreenElement read-only property returns the that is currently being presented in fullscreen mode in this document, or null if fullscreen mode is not currently in use.

71
79
64
16.4
71
16.4

The read-only fullscreenEnabled property on the Document interface indicates whether or not fullscreen mode is available.

71
12
64
16.4
71
16.4

The fullscreenerror event is fired when the browser cannot switch to fullscreen mode.

71
79
64
16.4
71
16.4

The fullscreenchange event is fired immediately after an Element switches into or out of fullscreen mode.

71
79
64
16.4
71
16.4

The fullscreenerror event is fired when the browser cannot switch to fullscreen mode.

71
79
64
16.4
71
16.4

The Element.requestFullscreen() method issues an asynchronous request to make the element be displayed in fullscreen mode.

71
79
64
16.4
71
16.4
requestFullscreen (options navigationUI parameter)

`options.navigationUI` parameter

71
79
16.4
71
requestFullscreen (returns promise)

Returns a `Promise`

71
79
64
16.4
71
16.4

The allowFullscreen property of the HTMLIFrameElement interface is a boolean value that reflects the allowfullscreen attribute of the iframe element, indicating whether to allow the iframe's contents to use Element.requestFullscreen.

38
12
22
10.1
38
12

The fullscreenElement read-only property of the ShadowRoot interface returns the element within the shadow tree that is currently displayed in full screen.

71
79
64
16.4
71
16.4
CSS selector
fullscreen

Fullscreen support

69
12
47
16.4
69
16.4
all elements

Select all elements in the fullscreen stack

12
43
Other
html.elements.iframe.allow.fullscreen
62
79
80
62

The HTTP Permissions-Policy header fullscreen directive controls whether the current document is allowed to use Element.requestFullscreen().

88
88
88
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Notes 1 item(s)
Implementation note
  • Previously available under a different name: :-webkit-full-screen (15)
Notes 1 item(s)
Implementation note
  • Previously available under a different name: :-moz-full-screen (9)
Notes 1 item(s)
Implementation note
  • Previously available under a different name: :-webkit-full-screen (6)
Notes 1 item(s)
Implementation note
  • Previously available under a different name: :-webkit-full-screen (18)
Notes 4 item(s)
Limitation
  • This browser only partially implements this feature
Implementation note
  • Only available on iPad, not on iPhone.
  • Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games.
  • Previously available under a different name: :-webkit-full-screen (12)
Notes 2 item(s)
Removed
  • This feature was removed in a later browser version (38)
Compatibility
  • Available with a vendor prefix: webkit (17)
Notes 2 item(s)
Removed
  • This feature was removed in a later browser version (18)
Compatibility
  • Available with a vendor prefix: moz (9)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (5.1)
Notes 2 item(s)
Removed
  • This feature was removed in a later browser version (38)
Compatibility
  • Available with a vendor prefix: webkit (18)
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Implementation note
  • Only available on iPad, not on iPhone.
  • Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games.
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (15)
Notes 2 item(s)
Removed
  • This feature was removed in a later browser version (14)
Compatibility
  • Available with a vendor prefix: webkit (12)
Notes 1 item(s)
Implementation note
  • Previously available under a different name: mozCancelFullScreen (9)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (5.1)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (18)
Notes 4 item(s)
Limitation
  • This browser only partially implements this feature
Implementation note
  • Only available on iPad, not on iPhone.
  • Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games.
Compatibility
  • Available with a vendor prefix: webkit (12)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (15)
Notes 2 item(s)
Removed
  • This feature was removed in a later browser version (14)
Compatibility
  • Available with a vendor prefix: webkit (12)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: moz (10)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (5.1)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (18)
Notes 4 item(s)
Limitation
  • This browser only partially implements this feature
Implementation note
  • Only available on iPad, not on iPhone.
  • Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games.
Compatibility
  • Available with a vendor prefix: webkit (12)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (20)
Notes 2 item(s)
Removed
  • This feature was removed in a later browser version (14)
Compatibility
  • Available with a vendor prefix: webkit (12)
Notes 1 item(s)
Implementation note
  • Previously available under a different name: mozFullScreenElement (9)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (6)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (25)
Notes 4 item(s)
Limitation
  • This browser only partially implements this feature
Implementation note
  • Only available on iPad, not on iPhone.
  • Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games.
Compatibility
  • Available with a vendor prefix: webkit (12)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (20)
Notes 1 item(s)
Implementation note
  • Previously available under a different name: mozFullScreenEnabled (10)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (6)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (25)
Notes 4 item(s)
Limitation
  • This browser only partially implements this feature
Implementation note
  • Only available on iPad, not on iPhone.
  • Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games.
Compatibility
  • Available with a vendor prefix: webkit (12)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (18)
Notes 2 item(s)
Removed
  • This feature was removed in a later browser version (14)
Compatibility
  • Available with a vendor prefix: webkit (12)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: moz (10)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (6)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (18)
Notes 4 item(s)
Limitation
  • This browser only partially implements this feature
Implementation note
  • Only available on iPad, not on iPhone.
  • Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games.
Compatibility
  • Available with a vendor prefix: webkit (12)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (15)
Notes 2 item(s)
Removed
  • This feature was removed in a later browser version (14)
Compatibility
  • Available with a vendor prefix: webkit (12)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: moz (10)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (5.1)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (18)
Notes 4 item(s)
Limitation
  • This browser only partially implements this feature
Implementation note
  • Only available on iPad, not on iPhone.
  • Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games.
Compatibility
  • Available with a vendor prefix: webkit (12)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (18)
Notes 2 item(s)
Removed
  • This feature was removed in a later browser version (14)
Compatibility
  • Available with a vendor prefix: webkit (12)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: moz (10)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (6)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (18)
Notes 4 item(s)
Limitation
  • This browser only partially implements this feature
Implementation note
  • Only available on iPad, not on iPhone.
  • Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games.
Compatibility
  • Available with a vendor prefix: webkit (12)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (15)
Notes 2 item(s)
Removed
  • This feature was removed in a later browser version (14)
Compatibility
  • Available with a vendor prefix: webkit (12)
Notes 2 item(s)
Implementation note
  • Previously available under a different name: mozRequestFullScreen (9)
  • Before Firefox 44, Firefox incorrectly allowed elements inside a `<frame>` or `<object>` element to request, and to be granted, fullscreen. In Firefox 44 and onwards this has been fixed: only elements in the top-level document or in an `<iframe>` element with the `allowfullscreen` attribute can be displayed fullscreen.
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (5.1)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: webkit (18)
Notes 5 item(s)
Limitation
  • This browser only partially implements this feature
Implementation note
  • Only available on iPad, not on iPhone.
  • Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games.
  • Only available on iPad, not on iPhone. Shows an overlay button which can not be disabled.
Compatibility
  • Available with a vendor prefix: webkit (12)
Notes 2 item(s)
Removed
  • This feature was removed in a later browser version (18)
Implementation note
  • Previously available under a different name: mozAllowFullScreen (9)
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Implementation note
  • Only available on iPad, not on iPhone.
  • Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games.
Notes 1 item(s)
Implementation note
  • Previously available under a different name: mozFullScreenElement (63)
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Implementation note
  • Only available on iPad, not on iPhone.
  • Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games.
Notes 1 item(s)
Removed
  • This feature was removed in a later browser version (79)

Syntax

HTML
document.getElementById('video').requestFullscreen();

// Exit fullscreen
document.exitFullscreen();

// Detect fullscreen status
document.addEventListener('fullscreenchange', () => {
  console.log('Fullscreen:', !!document.fullscreenElement);
});

Live demo

Request fullscreen

Use requestFullscreen on a container and update status text when the state changes.

PreviewFullscreen

Fullscreen support note

Summarize common fullscreen entry points on elements and media.

PreviewFullscreen

Presentation checklist

Pair the API with a few operational notes for accessibility and escape handling.

PreviewFullscreen

Use cases

  • Use Fullscreen API

    Use Fullscreen API when standard HTML needs a more specific platform feature, semantic signal, or browser capability.

  • Handle edge cases

    Apply Fullscreen API to solve a focused requirement without redesigning the whole page architecture.

Cautions

  • Test Fullscreen API in your target browsers and input environments before depending on it as a primary behavior.
  • Provide a fallback path or acceptable degradation strategy when support is still limited.

Accessibility

  • Make sure Fullscreen API supports the intended task without making the page harder to perceive, understand, or operate.

Powered by web-features