How can I copy something from a web page to my web page?

Note: All information on how a web page has been created can be viewed by viewing the web pages source code.

HTMLBelow is breakdown of how to copy information or code from one web page to another.

Plaintext
HTML and web scripts
Images, sounds, or movies
Embedded objects
Server scripts or programs

Plaintext

Plaintext or any text information viewable from your browser is copied like any other text from any other file.

If you are not familiar with how to copy text, see our copy information page for additional help.

HTML and web scripts

Users who visit a page that performs a special feature, such as displaying the current date or a countdown for example, may want to incorporate that feature on their web page. To do this, view the web page's source code.

In the page's source code locate the code required for this script to work. This may be difficult for users who are unfamiliar with HTML code or the script language. However, most web scripts will be enclosed in the <script> and </script> tags, and copying these tags as well as all the information in-between these tags allows the script to work on your web page. With JavaScript files if the code is not contained within the page it may also be in an external .js file.

Finally, if you are designing your web page in a WYSIWYG editor make sure you are pasting the HTML code into the HTML portion of the program. Many WYSIWYG editors have different views, a section to create and view a page without worrying about the code and another that allows code edits. In the case of Microsoft FrontPage, a user can get into the HTML portion by clicking the HTML tab at the bottom left hand side of the window.

Images, sounds, or movies

Users who want to use another site's images, sounds, or movies can do so by using one of the below suggestions.

Copy image, sound, or movie to your computer or server and use

Almost all images, sounds, and movies can be copied to your computer and then viewed on your web page.

Images

Images can be copied from a webpage by right-clicking an image and selecting "Save Picture as" or "Save Image as", depending on the browser you are using.

Once selected, you should be prompted with a location with where you want to save the image, specify the location of where you want to save the file. Keep in mind if this web page is going to be posted online, you also need to upload this image when you upload the web page.

Note: Although almost all images can be saved using the above method, some websites may prevent images from being copied to your computer because they are copy protected. Computer Hope will not assist users in copying these images as it is obvious that they do not have permission from the site hosting the pictures.

Sound and movies

Unless the sound or movie file has a direct download link, it can be a little trickier to copy another web page's sound or movie file. The easiest method would be to view your Internet browser's cache and locate the sound or movie file saved in the cache.

If you are not aware of what the movie or sound file's name is, view the web page's source to get that information.

Note: The above instructions are for copying sound or movie files that are not streaming. Some sites have streaming audio and video, which can be even trickier to copy.

Link to the image, sound, or movie from your website to the other server

A user could also link directly to the image, sound, or movie from another page. However, we do not recommend this method as it will slow down the load time of your web page because it is coming from another server; it is also likely to become lost because it may move on the other server, which would cause your link to become bad; and finally, causes additional bandwidth usage on the site you are linking to, which may cause your server to become blocked or reported because you are stealing bandwidth.

Users who are still interested in doing this can copy the HTML source code for the image, sound, or movie and then use that code to embed it into a web page.

Keep in mind that many pages do not specify the complete URL, so you may need to change the path of the file so the browser knows how to load it. For example, an image link from Computer Hope may look like the example below.

<img src="image.gif">

The above example does not specify the file's domain or path. Therefore, when this code is copied to your web page, it will not load because the browser is attempting to load the image from your computer and not where image.gif is located. If this code was copied from Computer Hope, you would likely need to change it to the example below.

 <img src="http://www.computerhope.com/image.gif">

If you need to know the complete path to an image, you can also right-click the image and click "Properties" to view the complete path to the file.

Embedded objects

Some files, such as Macromedia Flash files, are embedded web objects. This property means that you have to copy the file or link to the file on the other server, as well as the HTML used to display the file. In this case, we suggest looking at the source code of the object to determine the name of the file and how it is loaded, and copy both the code and the file.

Server scripts or programs

Server scripts, SSI, or other web programs are almost always protected or set to execute and not to be read. In other words polls, search engines, forums, chat, etc. cannot be copied and used on your own page unless the source is made available.

For these programs or scripts to become functional on your website, you would need to download the program, install it, and set it up for your own computer or server. Many sites use open source or free programs that can be downloaded for free or for a small fee. For example, many forums at the bottom of each of the pages will list the forum as well as a link to where to download it.