IMAGES, AUDIO and VIDEO'S IN HTML


        HTML Image : To Add Image to your website to make more beautiful, we have a <img> tag. Its attributes are, src which defines source or path of the image, and alt describes alternative name or text of the image. Precisely we can resize the image using height and width attributes. We can Image as Background Image for the document.

Its Syntax : <img src="Path of Image" alt="name" /> 

        HTML Video : The video element or <video> tag embeds a media player which supports video playback in the documents.

Syntax as follows : <video controls>
                                     <source="filename.mp4" type=" ">
                                    <source='"filename.ogg" type=" ">
                            </video>

        Here controls defines play, pause, volume and download attributes. As image here we can define width and height of video. Source 'src' defines the path or video to play or embed. Autoplay attribute used to play the video automatically. muted attribute used to until user wants the audio video will be muted.


         HTML Audio : The audio element or <vaudio> tag embeds a media player which supports audio playback in the documents.

Syntax as follows : <audio controls>
                                     <source="filename.mp3" type=" ">
                                    <source='"filename.ogg" type=" ">
                            </audio>

        Here controls defines play, pause, volume and download attributes. Source 'src' defines the path or audio to play or embed. Autoplay attribute used to play the audio automatically. muted attribute used to until user wants the audio audio will be muted.


<!DOCTYPE html>
    <head>
        <title>Images and Videos in HTML </title>
    </head>
    <body>
        <img src="imange.jpg" alt="image" height="300" width"200" />
        <video  width="200" height="200" controls autoplay muted>
            <source src="myvideo.mp4" type="video/mp4">
            <source src="myvideo.ogg" type="video/ogg">
        </video>
        <audio controls autoplay muted>
            <source src="mymusic.mp3" type="audio/mpeg">
            <source src="mymusic.ogg" type="audio/ogg">
        </audio>
    </body>
</html>