Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8396595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:34:33+00:00 2026-06-09T20:34:33+00:00

Hi im demonstrating the html tags that are new in CSS3 and I’m making

  • 0

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.

On clicking the source code link the source code must be viewed

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T20:34:35+00:00Added an answer on June 9, 2026 at 8:34 pm

    To get the source of just one element, do this:

    HTML: <div id="one"><span id="two"></span></div>
    JS:

    document.getElementById('one').innerHTML // returns <span id="two"></span>
    document.getElementById('one').outerHTML // returns <div id="one"><span id="two"></span></div>
    

    To get the source of the entire page, do this:

    document.doctype + document.documentElement.outerHTML
    

    document.doctype returns the doctype, and document.documentElement.outerHTML returns the code for the <html> tag and everything inside it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've built an upload button that's formatted to look like your typical html button,
There's a code example demonstrating feComposite to be found here: http://www.w3.org/TR/SVG/filters.html#feCompositeElement But the example
I'm working on making a dynamic HTML table using jQuery. In a table, my
I'm trying to apply CSS styles to some HTML snippets that were generated from
In the Apple documentation for NSRunLoop there is sample code demonstrating suspending execution while
I started a demonstration project on HTML, JSON and jQuery recently. Thing I want
Every example I was able to find demonstrating the w command of sed has
I wrote an HTML page which is being viewed primarily on the iPad. Basically
UPDATE: Here is a jsbin example demonstrating the problem. UPDATE 2: And here is
It has been stated that the google plus-one button works it's way up the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.