images - insert in webpage

revision:


Content

insert video using object tag insert image using object tag insert media files (e.g. gif files) with object tag insert PDF file with object tag insert image using img tag insert image using embed tag insert image using background-image property

insert video using object tag

top
code:
            <div>
                <object class="example-1" width="500" height="350" title="Wuzhen" style="margin-left:10vw;">
                    <param name="movie-1" value="Wuzhen-20-10_9091.mp4">
                    <param name="quality-1" value="high"> 
                    <embed src="../images/Wuzhen-20-10_01.mp4" quality="high" type="video/mp4" width="500" 
                    height="350"></embed>
                </object>
            </div>
        


insert image using object tag

top
code:
            <object class="example-2" width="500" height="350" title="holidays" style="margin-left: 10vw;">
                <param name="image-2" value="2.jpg">
                <param name="quality-2" value="high"> 
                <embed src="2.jpg" quality="high" type="image/jpg" width="500" height="350"></embed>
            </object>
        


insert media files (e.g. gif files) with object tag

top
Sorry!,Your browser does not support
code:
            <div class="example-3"class="flex-container" style="margin-left: 2insert PDF filevw;">
                <object height="250" width="500" data="../images/gif1.gif"></object>  
                <object height="250" width="500" data="../images/gif2.gif"></object>  
                <object height="250" width="500" data="../images/gif3.gif"></object>  
                <object height="250" width="500" data="../images/ducks.gif">Sorry!,
                Your browser does not support</object>  
            </div>         
        


insert PDF file with object tag

top

You don't have a PDF plugin, but you can download the PDF file.

code:
            <object class="example-4" data="../images/blog-20-12-13.pdf" type="application/pdf" width="500" height="300" 
            style="margin-left: 10vw;" typemustmatch> </object>
            <p>You don't have a PDF plugin, but you can <a href="../images/blog-20-12-13.pdf"> download the PDF file.
            </a></p>
        


insert image using img tag

top
holiday
code:
        <div>
            <img src="../images/1.jpg" alt="holiday">
        </div>
        <style>
            img{width: 100%; margin-top: 15px;}
        </style>
    

insert image using embed tag

top
code:
        <div>
            <embed src="../images/1.jpg" alt="holiday">
        </div>
        <style>
            embed{width: 100%; margin-top: 15px;}
        </style>
    

insert image using background-image property

top
code:
        <div class="image-container"></div>
        <style>
            .image-container{background-image:url("../images/1a.jpg"); background-size: cover; 
            width: 40vw; height: 40vw; margin-left: 1vw;}
        </style>