<i> be used instead of
<em>? if so, always or only on specific situations?
The short answer is that it’s a matter of semantics.
<i> is mostly for presentation. For example, if you had a book title, you might use
<i> tag to make the title in italics.
<em> will be interpreted as actual emphasis. For example, if you wish to say “That is your bag.” (with the emphasis on “your”, obviously) you would use
<em>. It matters because a screen-reading program such as might be used by a vision-impaired person will not read anything inside an
<i> tag with any emphasis, since
<i> is merely for visual appearance.
You might also find these links helpful:
Why does seem the same as ?
Thank you so much! I hadn’t realized that html effects screen-readers. I’ll be keeping that in mind!
User agents, in general, especially search engines.
<em/> is often used for keyword stuffing because the robot detects the emphasis. SEO wannabes will often go for this extra oomph to gain index ranking.
Real truth is nothing works like inbound links when it comes down to it. Page quality is somewhere down the list, after link calculation. A million inbound links far supersedes quality presentation or valid HTML/CSS/JS.
But, people still think keyword stuffing is a thing and still do it. Search engines are wise to that. Screen readers will gladly shout at their listeners if directed to do so.
Bottom line, don’t use
<em/> to italicize text. Like
<strong/> it is intentional emphasis that the listener should pick up on. Italics and boldface are often used for visual effect that do not bear emphasis. Be able to discern when we want to hear the effect, as well.