Firefox Copy Code - gHacks Tech News

Firefox Copy Code

While most users want to make sure that copied text from the web browser they are using does not contain any formatting or code, some users might just need that.

Web developers for instance may be inclined to copy the html code instead of plain text if they want to analyze it further or paste it into an editor of sorts to work on it further.

Maybe you want to copy a properly formatted HTML table into a rich text editor and retain the layout of it in the process.While it may be possible to browse the source code of the site directly to copy the relevant code bits from it, it is not always practicable and may also be time consuming depending on the structure of the code and your experience.

Copy Code on the other hand automates the process. After installing the Firefox add-on it is simply a matter of selecting the text on the website that you want to copy, right-clicking when you have done that and choosing the Copy HTML entry from the menu.

copy html

The Copy Code add-on for Firefox is a experimental add-on which means that users who want to install it need to log into the Mozilla website first.

Update: Copy Code has been discontinued. Firefox users can take a look at the Copy HTML add-on which provides a similar functionality.

The core difference between selecting the copy command and the copy HTML command from the context menu is that the former copies only the text while the latter will copy all HTML elements that are part of the display.

Recent versions of the Firefox browser come with Developer Tools included that may be sufficient for some users.

Just hit the F12 key on the keyboard to load the developer interface. Once it is open click on the selection icon (showing a cursor) next to Inspector and move the mouse cursor over the element you want to analyze.

Click on it and Firefox displays its surrounding code in the Inspector module. There you find copy options among others when you right-click.

firefox copy html

It means basically that you don't need to install the extension anymore as you find the same functionality integrated into the Developer Tools of the browser.

Firefox Copy Code
Article Name
Firefox Copy Code
If you need to copy HTML code regularly when you are browsing the web in Firefox, you can do so installing the Copy HTML extension.

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Previous Post: «
Next Post: »


  1. abhishek said on November 7, 2008 at 11:26 am

    there is another extension which solve this another problem opposite to this problem – when you may want to copy text rather than link called copy link text

    Copy Link Text

  2. Earle said on November 7, 2008 at 5:34 pm

    see C.O.L.T.,plain text,html,bb code and more

  3. venkat said on November 9, 2008 at 6:54 am

    this add-on will be very useful for bloggers specially in case of copying html code

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.

Be polite: we do not allow comments that threaten or harass, or are personal attacks. Please leave politics and religion out of discussions!