Copying HTML code in Google Chrome's inspect element Copying HTML code in Google Chrome's inspect element google-chrome google-chrome

Copying HTML code in Google Chrome's inspect element


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.


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