Open In App

How to Hide Full Screen Button of the Video Tag in HTML5 ?

The <video> element is used to embed video content on the web page. It allows the addition of video files in many formats such as MP4, WebM, etc. This element supports attributes like controls, autoplay, and loop to control video playback. It also enables the addition of captions and subtitles for accessibility.

Preview:

Output

Approach:

Example: Illustration of hiding the full-screen button of the video tag in HTML5.




<!DOCTYPE html>
<html lang="en">
 
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,
                   initial-scale=1.0">
    <title>GFG</title>
    <style>
 
        /* Hide the full-screen button */
        video::-webkit-media-controls-fullscreen-button {
            display: none;
        }
    </style>
</head>
 
<body>
    <h2 style="color: green;">
        GeeksForGeeks
    </h2>
    <h3>
        How to hide full screen
          button of the video
    </h3>
    <video id="myVideo" width="320"
           height="240" controls>
        <source src=
                type="video/mp4">
    </video>
 
</body>
 
</html>

Output:

Output


Article Tags :