Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copying HTML code in Google Chrome's inspect element

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?

like image 955
user3581631 Avatar asked Apr 28 '14 14:04

user3581631


People also ask

How do I copy HTML code from inspect element?

You can copy by inspect element and target the div you want to copy. Just press ctrl+c and then your div will be copy and paste in your code it will run easily.

How do I copy HTML code from Chrome?

Chrome: Right-click a blank space on the page and choose View Page Source. Highlight the code, then copy and paste to a text file. Firefox: From the menu bar, choose Tools > Web Developer > Page Source. Highlight the code, then copy and paste to a text file.

How do you copy HTML code?

4. Copy the HTML: Press the CTRL+C shortcut to copy, or right-click on your selected text and click Copy.


2 Answers

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.

like image 65
barryjones Avatar answered Oct 11 '22 13:10

barryjones


  1. Right click → copy → copy element

enter image description here

like image 37
Vincent Tang Avatar answered Oct 11 '22 13:10

Vincent Tang