How to copy something from a web page to my web page

Updated: 11/13/2018 by Computer Hope
Note

All information on how a web page is created can be viewed by viewing the web pages source code.

HTML

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

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 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. Reading the code can 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. The information contained in these tags is a JavaScript program which runs in your browser, providing enhanced functionality when you use the website. (If the JavaScript is included on the page, it's called an "inline" script. However, the JavaScript running on a website may also be linked in a separate, external JavaScript 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 corner 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 web page 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 another 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. The slowdown may primarily occur because of the additional time it takes to initiate a connection to that server. Another potential disadvantage is that you don't control that data. Its location may change at any time (or be taken offline entirely), which would cause your link to break. Finally, consider that the administrator of the website you're linking to might expressly forbid you to link to their content. By linking to their content, you are adding to the usage of their bandwidth and other server resources. For this reason, always seek explicit permission from another website before linking to its content.

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="https://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. You can look at the source code of the object's <embed> tag to find information about the embedded object, such as its file name and display parameters.

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 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 personal 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.