Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it necessary to include alt in images

Tags:

html

W3c specifies to use alt for all Images in the website for accessibility. How one can set it for image like bullet in javascript menus or background images or blank images (images used to get design or for general purposes) ?

like image 966
Karthik Ratnam Avatar asked Dec 05 '10 16:12

Karthik Ratnam


1 Answers

alt attribute is required for <img> tags if you want your markup to validate. Background images and bullets are just cosmetic, they don't need an alternate representation as they are not part of the content.

like image 135
Matteo Riva Avatar answered Oct 24 '22 01:10

Matteo Riva