You can use srcdoc attribute to include HTML Code to Iframe.
<iframe srcdoc="<html><body>Hello, <b>world</b>.</body></html>"></iframe>
For JSF as htmlCode is the code as String
<iframe srcdoc="${bean.htmlCode}"></iframe>
If your HTML contains double quotes, consider escaping its double quotes