Copying HTML code in Google Chrome's inspect element

HtmlGoogle ChromeCopyGoogle Chrome-DevtoolsInspect Element

Html Problem Overview


I have a website of which I want to copy an HTML code from - how do I copy all the text in inspect element - so I don't get the website's HTML code, but the code that I have already changed so that I don't have elements I don't want in my own webpage?

Html Solutions


Solution 1 - Html

Do the following:

  1. Select the top most element, you want to copy. (To copy all, select <html>)
  2. Right click.
  3. Select Edit as HTML
  4. New sub-window opens up with the HTML text.
  5. This is your chance. Press CTRL+A/CTRL+C and copy the entire text field to a different window.

it's the easiest way to do this.

Solution 2 - Html

  1. Right click → copy → copy element

enter image description here

Solution 3 - Html

  1. Select the <html> tag in Elements.
  2. Do CTRL-C.
  3. Check if there is only lefting <!DOCTYPE html> before the <html>.

Solution 4 - Html

Using HTTrack software you can download all the website content to your local directory. HTTrack: <http://www.httrack.com/>

Solution 5 - Html

This is bit tricky

Now a days most of website new techniques to save websites from scraping

> 1st Technique

Ctrl+U this will show you Page Source enter image description here

> 2nd Technique

This one is small hack if the website has ajax like functionality.

Just Hover the mouse key on inspect element untill whole screen becomes just right click then and copy element enter image description here

> That's it you are good to go.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser3581631View Question on Stackoverflow
Solution 1 - HtmlbarryjonesView Answer on Stackoverflow
Solution 2 - HtmlVincent TangView Answer on Stackoverflow
Solution 3 - HtmlPedro ReisView Answer on Stackoverflow
Solution 4 - HtmlDilshan DilipView Answer on Stackoverflow
Solution 5 - HtmlAhmed MujtabaView Answer on Stackoverflow