

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to specify the HTML content of the page to show in the <iframe> in HTML?
Use the srcdoc attribute to specify the HTML content of the page to show in the <frame>. You can try to run the following code to implement srcdoc attribute −
Example
<!DOCTYPE html> <html> <body> <iframe srcdoc = "<h2>Tutorialspoint</h2>" src = "new.html"> <p>Browser do not support iframes.</p> </iframe> </body> </html>
- Related Questions & Answers
- How to specify the URL of the page the link goes to in HTML?
- How to specify the language of the element's content in HTML?
- How to specify that the element should automatically get focus when the page loads in HTML?
- How to specify the kind of text track in HTML?
- How to specify whether the content of an element should be translated or not in HTML?
- Enable an extra set of restrictions for the content in an <iframe> in HTML?
- How to create an inline frame using the <iframe> tag inside an HTML page?
- How to specify the URL of the image to use in different situations in HTML?
- How to specify the URL of the resource to be used by the object in HTML?
- How to specify that an option should be pre-selected when the page loads in HTML?
- How to load the content of an iframe dynamically using jQuery?
- How to specify if and how the author thinks the audio/video should be loaded when the page loads in HTML?
- How to specify citation in HTML?
- How to specify that the details should be visible to the user in HTML?
- How to get the body's content of an iframe in JavaScript?
Advertisements