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>