HTML <i> Tag
The <i> tag in HTML is used to display the content in italic style. This tag is generally used to display the technical term, phrase, the important word in a different language. The <i> tag is a container tag that contains the opening tag, content & closing tag.
Accepted Attributes: This is a Global attribute, and can be used on any HTML element.
Below code examples illustrate the use of <i> tag in HTML.
Example 1: This is a simple example illustrating the <i> tag to make the italic text in HTML.
Example 2: In this example, we have used <i> tag & <p> tag to illustrate the difference in the text appearance while rendering it.
Example 3: A text can be written in italics using CSS also. When the CSS font-style property is set to italic, then the text can be seen as follows:
- Use the <i> tag for words that you want to show differently from the normal phrase for readability purposes
- The tags like <i> and <b> now define semantics rather than typographic appearance. So to display text in italic type, users can use the CSS font-style property.
- Use <i> tag only when it is not marked up with these elements:
- Google Chrome 93.0
- Internet Explorer 11.0
- Microsoft Edge 93.0
- Firefox 92.0
- Opera 78.0
- Safari 14.1