View video tutorial

HTML Media

HTML

Any media files such as audio, video, graphics, etc. can be displayed in HTML.

HTML Media.


➔ There are many types of media files.

➔ Audio files can only be played and listened to..

➔ Video files are also being displayed along with audio.

➔ Media files have different formats.

➔ The same medium can exist in different formats.

➔ HTML has many elements like <audio>, <video>, <embed>, <object> etc. to deal with these files.

Learning with HTML Editor "Try it Now"

You can edit the HTML code and view the result using online editor.

Example

<!DOCTYPE html>
<html>
<!-- Example: iframe element -->
<head>
    <title>HTML iframe tag example</title>
    <style>
        .d1 {
            border: 1px solid black;
            border-radius: 5px;
            padding: 5px;
            margin-top: 10px;
            width: 680px;
            height: 480px;
        }

        .d2 {
            border: 1px solid rgb(19, 18, 18);
            border-radius: 5px;
            padding: 5px;
            margin-top: 10px;
            width: 600px;
            height: 250px;
        }
    </style>
</head>
<body>
    <h1>HTML iframe tag example </h1>
    <h1>Document in iframe</h1>
    <div>
        <iframe class="d2" src="index.jsp" title="Iframe Example"></iframe>
    </div>
    <h1>Media in iframe</h1>
    <div>
        <iframe class="d1" src="resources/media/seaside.mp4" allowfullscreen></iframe>
    </div>
</body>
</html>
Try it Now »

Click on the "See output" button to see how it works.