There are some semantically correct and incorrect ways of displaying different kinds of images.
- Normal images It's better to use standard
<img>
tags, because they are often the main content of a site. These should havealt
tags to inform users about important parts of content. - Icons are a kind of image which isn't the main content of your site, but they should also be displayed by using
<img>
tags because it's important for usability to show what specific icons do if it's not displayed correctly. - Not important pictures which make the site nice and are not main content of the site should be displayed as background, because then you do not use unnecessary Nodes in your
DOM
.