Categories
HTML

How to embed an external page without an iframe with HTML?

Spread the love

Sometimes, we want to embed an external page without an iframe with HTML.

In this article, we’ll look at how to embed an external page without an iframe with HTML.

How to embed an external page without an iframe with HTML?

To embed an external page without an iframe with HTML, we use the object element.

For instance, we write

<object
  type="text/html"
  data="http://www.example.com"
  style="width: 100%; height: 100%"
>
  <p>backup content</p>
</object>

to add the object element with the data attribute set to the URL of the page to show.

Conclusion

To embed an external page without an iframe with HTML, we use the object element.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *