Hi im demonstrating the html tags that are new in CSS3 and I’m making a documentation for the easy viewing and interpretation on comparing both the source code and the output.And its its really hard for me going to the source code and then selecting the file and browsing it on the browser
It would be great if I could view both the source code and the output
on the same html page.
For example(I m talking from the page I ve attached below) if I select Source code the source code must be displayed on the screen or from any of the text editors.
I don’t know whether it is possible to do so,If possible it would be great
if anyone of you could guide me.

To get the source of just one element, do this:
HTML:
<div id="one"><span id="two"></span></div>JS:
To get the source of the entire page, do this:
document.doctypereturns the doctype, anddocument.documentElement.outerHTMLreturns the code for the<html>tag and everything inside it.