Images
IMG
This tag allows you to modify an image for display. While the <img> tag doesn't support a normal </img> closing tag, we close the tage using a /> at the end of the tag. Although you can modify both height and width of an image, if you do not keep the image proportions... your new picture will look really bad.
<img src="picture location" alt="picture description" />
The picture location can be determined two ways:
- If saved in your www folder, simply by its name.
- If from a web address, the entire url, including http://...etc.
| Tag Attribute | Attribute Explaination | Example |
|---|---|---|
| ALT | Defines an alternate text for the image. This is used to inform the reader of what he or she is missing on the page if an image cannot load properly. | alt="A picture of me & my german sheppard" |
| BORDER | Defines a border for the image. | border="5px" |
| HEIGHT | Defines the height of the image. | height="800px",height="10%" |
| SRC | This attribute is necessary to specify the image location. | src="image_name.jpg" |
| WIDTH | Defines the width of the image. | width="800px",width="10%" |
Please keep in mind that file extenstions are not always added/or required for images in your www folder. When referencing an image, it is entirely case sensitive. Also, you should always define some content for the alt attribute. This will help readers know what the image is if the image doesn't load or if they are using screen reading devices.




