Include a webpage inside a div

Viewed 72745

I have to include a webpage inside my webpage's div. I want somehting like iframe to be done with DIV. Basically, I will be providing a URL to my div and it has to open it inside itself... Do we have something like this in modern HTML? I cannot use frames as some browsers have issues with frames.

7 Answers

Actually, I agree with Frédéric Hamidi from above. Just embed an “object” inside a div and reference the URL of the other page in that object.

You can set all the styling for the second page on itself or in a separate CSS file. That styling gets imported along with the page content without conflicting with the current pages style or scripts.

I tested Frédéric Hamidi’s theory on these browsers, all performed just fine.

• Internet Explorer – v11

• Microsoft Edge - v 84.0.522.59 (Official build) (64-bit)

• Google Chrome – v84.0.4147.105

• FireFox – v79.0

• Brave – v1.11.104

• Opera – v69.0.3686.95

• Safari – v13

Related