The primary purpose of alt text is accessibility — without it, screen reader users hear nothing where an image should communicate something. The SEO benefit is real but secondary: Google uses alt text as one signal for ranking in Google Images and for the contextual relevance of the surrounding page.
Good alt text describes what is in the image in the context of the page. A product photo on a product page might be 'Black ceramic coffee mug, side view'. The same image on a 'how to brew pour-over' guide might be 'Pour-over coffee dripper sitting on a black ceramic mug'.
Decorative images (background patterns, dividers) should have empty alt (`alt=''`), not omitted alt — empty alt tells assistive tech to skip the image, while omitted alt forces it to announce the filename.

