JS

Beginner HTML Topics - purpose of alt attribute

4.

What is the purpose of the alt attribute in an image tag?

It determines the size and dimensions of the image.

It helps with search engine optimization by providing keyword-rich text.

It serves as a tooltip when the user hovers over the image.

It specifies the alternative text that is displayed if the image cannot be loaded.