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.
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.
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.Advertisement
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:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.