We all can agree that images make content more vivid and visual. Plain text does not attract much user attention, causes boredom, and makes it difficult to perceive information. That is why it is very important to emphasize images, both the background one and the image that complements the content.
Before you can learn how to test images on web pages and what you should pay attention to when testing them, you need to understand how images ended up on the page. In other words, you need to know how images are inserted, what tags, parameters, and image formats are used, etc.
So to insert a graphic image in HTML you need to use the <img> tag. This tag has two mandatory attributes:
- srс – allows specifying the path to the file;
- alt – used as an alternative text instead of the image in case it is not loaded.
Syntax:
<Img src = "image name.jpg" alt = "alternative text">
If the image is taken from another web resource instead of being in the root folder of the project, the image from the tag can be a link, and the <img> tag is put inside the <a> tag.
Syntax:
<a href="page.html"> <img src = "image URL" alt = "coming soon"> </a>
Alternative text for informative images should have the same meaning as the image.