Reference number: CH000745
How can I copy something from a webpage to my
webpage?
Question:
How can I copy something from a webpage to my webpage?
Additional information:
Users who are creating their own webpage for the first time or
come across something they like may wish to use someone else's code
or information on their webpage to learn how something is done or to
duplicate the same effect.
IMPORTANT: Before using any other site's code or information, you should always
get the website's or author's permission as it almost always going to be
copyrighted material unless
otherwise stated. If the code or information is public domain, it will
be stated within the code of the page; otherwise, assume it is
copyrighted.
Answer:All the information and how a webpage has been created can be easily
viewed by any user on the Internet. Additional information about how
to view the source code of a web page in your browser can be found on
document CH000746.
Below is break down of how to copy all the different types of
information or code from one webpage 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 can be easily
copied
like any other text from any other file.
If you're not familiar with how to copy text, see our
copy
dictionary definition 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 wish to incorporate
that feature on their web page. To do this, you will need to view the
web page's source code; information about how to do this can be found on
document CH000746.
In the page's source code you will need to locate the code required
for this script to work. This may be difficult for users who are
unfamiliar with HTML code and/or
the language the script was written in. 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 will usually enable the script to work on your web page.
Finally, if you're designing your web page in a
WYSIWYG
editor such as Microsoft
FrontPage,
you need to make sure you're pasting the HTML code into the HTML
portion of the program. Many WYSIWYG editors will have different
types of editors, one section that allows the user to simply create a
page without worrying about the code and another section that enables
the user to get into the code. 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 wish 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 / server and use
Almost all images, sounds, and movies can be copied to your
computer and then viewed on your webpage.
Images
Images can be easily copied from a webpage by right-clicking an
image and selecting "Save Picture as" or "Save Image
as", depending on the browser
you're using.
Once selected, you should be prompted with a location with where
you wish to save the image, specify the location of where you wish to
save the file. Keep in mind if this web page is going to be posted
online, you will 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 movies file has a direct link to download and
save the file to a specified location on your hard disk drive, it can
be a little trickier to copy another web page's sound or movie file.
However, the easiest method would be to view your Internet browser's
cache and locate the sound or movie file saved in the cache.
- Additional information about clearing and viewing your browser's
cache can be found on document CH000510.
- If you're trying to save a movie from a popular service such
as YouTube see document CH001002.
If you're 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
In addition to copying the files directly to your computer or
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's 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're linking to, which may cause your server to
become blocked or reported because you're stealing bandwidth.
However, users who are still interested in doing this can simply
copy the HTML source code for the image, sound, or movie to their web
page and have it work on their webpage without having to upload the
image, sound, or movie to their server.
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 below example.
<img src="image.gif">
Because this above example does not specify a
domain
and path of the file 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
or server and not the server where the code was copied from. If
this code was copied from Computer Hope, you would likely need to
change it to the below example.
<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, which means not only will
you have to copy the file or link to the file on the other server, but
you will also need to copy 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
Sever scripts, SSI, or other web programs are almost always
protected or set to execute and not to be read. This means programs such
as polls, search engines, forums, chat, etc. cannot be copied and
used on your own page.
For these types of 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 type of forum as
well as a link to where to download it.
|