12 Program to demonstrate IFrame in HTML

Program:
<!DOCTYPE html>

<html lang="en">



<head>



    <title>HTML IFrame TAG</title>

    <style>

        body {

            font-family: Arial, sans-serif;

        }



        .embed-container {

            position: relative;

            padding-bottom: 56.25%;

            height: 0;

            overflow: hidden;

            max-width: 100%;

        }



        .embed-container iframe,

        .embed-container object,

        .embed-container embed {

            position: absolute;

            top: 0;

            left: 0;

            width: 100%;

            height: 100%;

        }

    </style>

</head>



<body>

    <!-- Simple IFrame -->

    <h2>Simple Iframe</h2>

    <iframe src="./01_HTML_Headings.html" title="HTML Headings"></iframe>



    <!-- Youtube video using IFrame -->

    <h2>Youtube video using IFrame</h2>

    <div class="embed-container">

        <iframe allowfullscreen="" frameborder="0" src="https://www.youtube.com/watch?v=yab1vA6v-VM"></iframe>

    </div>

</body>



</html>


Output: The YouTube Video is not Showing due to security issue with https over http.
IFrame in HTML

Previous
Next Post »