Learn how to find the image code or URL for your images and then add the image code to your Web pages.
Time Required: 1 minute
- Go to the page with the image you want on your web page. Note: you should use an image that you own, pointing to other people's images is considered bandwidth theft and can get you in trouble. And copying their image to your website is a copyright violation.
- In Internet Explorer: Right click on the image and choose “Properties.” Copy the address of the image.
In Firefox: Right click on the image and choose “copy image location.”
- Once you have your image URL, you can add it to the HTML document. The easiest way is to click on the “add image” icon in your web editor. But if you don’t have one, here’s how to add it with HTML:
- Paste in the URL.
" alt="Your alternate text">
- Upload your web page and test it in a web browser.
- Your final image code will look something like this:
<img src="URL" alt="alternate text">
heightattributes are not required on images, but they help them load faster. If you know the dimensions of your image, you should include them as
width=""attributes. For example:
<img src="image.gif" alt="image" height="300" width="200">
- Good Alternate Text: Describe your image in the
altattribute. If the image has text in it, the alternate text should say the same as the image.
- Image Dimensions: Image
heightare defined in pixels, but do not include the “px” in your
heightattributes. And always use the exact dimensions. Don’t use the
heightattributes to resize your images. This can result in huge images that take forever to download, and browsers don’t resize images very well.