By the end of this class, students will:
<img> tag.src, alt, width, and height.Concept:
Images make websites visually appealing. They can be icons, logos, banners, or even product photos.
HTML Tag Used:
<img src="path" alt="description">
✅ The <img> tag is self-closing (it doesn’t have a closing tag).
<img src="images/logo.png" alt="Company Logo">
| Attribute | Description | Example |
|---|---|---|
src |
Specifies the path to the image | src="images/logo.png" |
alt |
Describes the image for screen readers or when it fails to load | alt="Company Logo" |
width |
Sets width of image (in px or %) | width="200" |
height |
Sets height of image | height="150" |
title |
Shows tooltip text on hover | title="Our Company Logo" |
If your folder structure looks like this: