Learning Report 1

Linking Images in HTML

In this Learning Report,we will show how to link pictures in HTML.

Why Images?

Images make up a large part of the web - most websites contain images. Using HTML you can easily add images to your website and embed images into your web pages. To embed an image into a web page, you first need an image in .jpg, .gif, or .png format. Once you've created an image, you need to embed it into your web page. To embed the image into your web page, use the < img /> tag, specifying the actual location of the image.

Image Attributes

  • src - Required attribute. This is the path to the image.
  • width - Optional attribute. This specifies the width to display the image. If the actual image is wider, it will shrink to the dimensions you specify here. Likewise, if the actual image is smaller it will expand to your dimensions.
  • height - Optional attibute. This specifies the height of the image. Functions much like width.

Sources

www.quackit.com

Example

An example of what the code would look like is: < img src="www.coolsite.com/images/notareallink.jpg" width="200" height="200" >

Example image on this site