Search code examples
htmlobjectframe

How to add html page to another html page by using object tag?


I found this code. but it is not working...

<div id="frame">
     <object type="text/html" data="slider.html"></object>
</div>

Solution

  • You Have to set the width and height of object

    <object class="myObject" type="text/html" data="myFile.html"></object>
    
    <style>
    .myObject {
       height:500px;
       width:500px;
    }
    </style>