0
How to add alt attribute using css ?
I would like to add a background image to the page with css but don't know how to add the "alt" attribute. Am not using the <img> tag of html.
3 Réponses
+ 1
just add background color before background image
ex:
.somediv{
background: #fafafa; /* div will have this color as background if your image will not load */
background: url('your image')
}
0
background image don't need to have alt attribute
0
you can add a title to the container div. it will do the job.