HTML <i> Tag
Topic: HTML5 Tags ReferencePrev|Next
Description
The <i> (short for italic) element rendered the enclosed text in an italic (slanted) typeface.
The following table summarizes the usages context and the version history of this tag.
| Placement: | Inline |
|---|---|
| Content: | Inline and text |
| Start/End Tag: | Start tag: required, End tag: required |
| Version: | HTML 2, 3.2, 4, 4.01, 5 |
Note: Unlike <em>, the <i> element simply sets the font to italics, it doesn't offer semantic meaning about the text it contains. The <i> element should, therefore, be used only as a last resort when no other element is more appropriate.
Syntax
The basic syntax of the <i> tag is given with:
The example below shows the <i> tag in action.
Example
Try this code »<p>Here is some <i>italic</i> text.</p>
<p>Here is some <i>more italic</i> text.</p>
Tag-Specific Attributes
The <i> tag doesn't have any specific attribute.
Global Attributes
Like all other HTML tags, the <i> tag supports the global attributes in HTML5.
Event Attributes
The <i> tag also supports the event attributes in HTML5.
Browser Compatibility
The <i> tag is supported in all major modern browsers.
Basic Support—
|
Further Reading
See tutorial on: HTML Text Formatting.
Related tag: <em>.

