How to specify in HTML the HTML content of a page to be displayed in an

HTML

The

HTML specifies an inline frame. This inline frame is used to embed another document within the current HTML document. This tag is supported by all browsers such as Google Chrome, Microsoft Edge/Internet Explorer, Firefox, Safari, Opera, etc.

The "

srcdoc" attribute of the tag is used to specify the HTML content

Example 1

In the following example, we use the "srcdoc" attribute with the




   
      How to specify the HTML content of the page to show in the "iframe" in HTML?
   

How to specify the HTML content of the page to show in the "iframe" in HTML?

We can do it by using srcdoc attribute of iframe in HTML.

Copy after login

As we can see in the output, the HTML content (

elements) in the document is displayed in
Copy after login

As we can see in the output, the HTML content (HTML table) in the document is displayed in

Copy after login

As we can see in the output, the HTML content ( element) in the document is displayed in

The above is the detailed content of How to specify in HTML the HTML content of a page to be displayed in an