HTML <iframe> Tag with the 'srcdoc' Attribute

<iframe srcdoc="
<html>
<head>
</head>
<body>
<p>Nested browsing context using the <code>srcdoc</code> attribute.</p>
</body>
</html>
" 
width="150" height="150"></iframe>

The above example demonstrates usage of the <iframe> element that uses the srcdoc Attribute.

The <iframe> element represents a nested browsing context. The srcdoc attribute can be used to provide the content that should be contained in the nested browsing context. If you don't use this attribute you could use the src attribute to provide the URL of a document that the nested browsing context is to contain.