Difference between <i> and <em> tag of HTML
1. <i> tag :
It is one of the element of HTML which is used in formatting HTML texts. It is used to define a text in technical term, alternative mood or voice, a thought, etc.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.
<i> Content... </i>
2. <em> tag :
It is also one of the element of HTML used in formatting texts. It is used to define emphasized text or statements.
<em> Content... </em>
By default, the visual result is the same. The main difference between these two tag is that the <em> tag semantically emphasizes on the important word or section of words while <i> tag is just offset text conventionally styled in italic to show alternative mood or voice. Below is the code to show this difference between the two :
Here, there is no added emphasis or importance on the word “Iron Man”. It just indicates here iron isn’t a mineral or metal but it refers to a character. But in the next sentence the reader will use verbal stress on the word “best”.
Though they appears to be same but semantic meaning is different.
Supported Browser : The browser supported by <i> and <em> tag are listed below.
- Firefox (Gecko)
- Firefox Mobile (Gecko)
- Internet Explorer (IE)
- Edge Mobile
- Opera Mobile
- Safari (WebKit)
- Safari Mobile