Is there a way to use pure html-code to display inside a frame instead of having to link to a specific URL/file?
For example:
NOT like this
In HTML5 there appears to be a way to do this:
See here, supposedly this is the purpose of the new html5 srcdoc
attribute.
According to the MDN, it appears only chrome will honor the srcdoc
attribute at this time.
I wasn't able to get this attribute to work, so it's probably not a viable option at this time. As others suggested, using a div
is probably a better solution.