How to create a nested webpage in HTML ?
When the content of one completely different webpage is embedded into another webpage, it is called a nested webpage. In simple words, a webpage that is inside another webpage of a completely different domain.
In this article, we are going to learn how to create a nested webpage. There are two methods to create a nested webpage. They are as follows.
- Using <iframe> tag
- Using <embed> tag
1. Using <iframe> tag:
The iframe in HTML stands for Inline Frame. The “iframe” tag defines a rectangular region within the document in which the browser can display a separate document, including scrollbars and borders. An inline frame is used to embed another document within the current HTML document
It can take the height and width of the inline frame as attribute.
The <embed> tag in HTML is used for embedding external applications which are generally multimedia content like audio or video into an HTML document. But another raw HTML content can be embedded using this tag. We can use this feature to create a nested webpage.
<embed src="URL" type="text/html" />
The website can prevent you from embedding their content due to copyright issues. So it is mandatory to have proper permission and authorization before using another webpage as a nested webpage inside your website.