I'm making a tutorial website. Some HTML, CSS, and JS is presented and then in a box its result is shown - basically what Codepen does. I've been just storing a separate doc in a demo directory and then using an iframe on the tutorial page; is there any way to do this inline? Something like:
<style>
p{color: red;}
</style>
<demo>
<p>text</p>
</demo>
and have the paragraph render inline, ignoring the color: red that was specified in the parent page CSS. It's just cumbersome editing a separate file and using iframe and I guess Codepen is a little more convenient but it's an extra thing to embed. I would appreciate any help.