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.
The HTML <iframe> tag specifies an inline frame. An inline frame is used to embed another document within the current HTML document.
Any sort of content can be put inside the <div> tag!
HTML code can be appended to a div using the insertAdjacentHTML() method. However, you need to select an element inside the div to add the code. This method takes two parameters: The position (in the document) where you want to insert the code ('afterbegin', 'beforebegin', 'afterend', 'beforeend')
Nope. You can't embed a complete HTML document inside another div element as this is a block level element and W3C has defined what could be included inside it.
But there is a workaround. Follow these steps:
<body>
element and put it inside your div
element<head>
element and append them to the <head>
element of your existing pgae.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With