Can `<i>` be used instead of `<em>`?


#1

can <i> be used instead of <em>? if so, always or only on specific situations?


FAQ: Learn HTML Elements - Intro to HTML - Styling Text
FAQ: Learn HTML Elements - Intro to HTML - Styling Text
#2

Hi, there!

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:

https://www.w3schools.com/tags/tag_i.asp

https://softwareengineering.stackexchange.com/questions/255366/why-are-the-b-and-i-tags-deprecated