An img element places an image on a web page. The image remains a separate file; the browser uses the element to find that file and display it where specified. section 6.1
Build the element from three useful attributes:
- src points to the image file, using a filename, path, or full URL. section 6.1
- alt supplies a short description for failed images and assistive technologies; use an empty value for decorative images. section 6.1
- title optionally provides tooltip text when the pointer hovers over the image. section 6.1
A small image recipe
<img src="images/logo.png" alt="Example Company logo" title="Example Company"> Think of src as the image’s address and alt as a helpful spoken description. Use figure and figcaption when the image needs semantic framing, or place the img inside a link to make the picture clickable. section 6.1 section 6.34
An img element is inline, so it can flow inside a paragraph. CSS vertical-align can place it at the baseline, bottom, middle, or top of surrounding text. section 6.13
<img src="file" alt="description" title="tooltip">
Use this compact syntax as a checklist while adding an image. section 6.34
Try adding a logo to a page, then make a row of thumbnail images for a photo gallery. section 15.7


