HTML Images by UDEMIE – Images are one of the most important resources you must have on your webpage. Imagine you went to a shopping website and all you could see was just plain texts with zero images. Wait buddy! How would you feel? 😂
Hint: Images improve the design and the appearance of a web page.
HTML – Images Synopsis
To add an image to your HTML document, you use the <img>
tag. The <img>
tag is a self-closing tag, meaning it does not need a closing tag. It requires a few attributes to function correctly:
src
: Specifies the path to the image file.alt
: Provides alternative text for the image if it cannot be displayed.
Here’s a basic example of how to add an image to your webpage:
<img src=”path/to/your/image.jpg” alt=”Description of image”>
Example
Let’s say we want to add an image of a cute puppy to our webpage. We would do something like this:
<img src=”images/cute-puppy.jpg” alt=”A cute puppy”>
Read HTML – Images online
You can use the link below to read HTML – Images online