<i>

  • Revision slug: Web/HTML/Element/i
  • Revision title: <i>
  • Revision id: 493799
  • Created:
  • Creator: kscarfone
  • Is current revision? No
  • Comment Updated tags

Revision Content

Summary

The HTML <i> Element represents a range of text that is set off from the normal text for some reason, for example, technical terms, foreign language phrases, or fictional character thoughts. It is typically displayed in italic type.

Attributes

This element only includes the global attributes.

Example

<p>The Latin phrase <i>Veni, vidi, vici</i> is often mentioned in music, art, and literature</p>

Result

The Latin phrase Veni, vidi, vici is often mentioned in music, art, and literature

Notes

In earlier versions of the HTML specification, the <i> tag was merely a presentational element used to display text in italics, much like the <b> tag was used to display text in bold letters. This is no longer true, as these tags now define semantics rather than typographic appearance. The <i> tag should represent a range of text with a different semantic meaning whose typical typographic representation is italicized.  This means a browser will typically still display its contents in italic type, but is, by definition, no longer required to.

Use this element only when there is not a more appropriate semantic element. For example:

  • Use {{HTMLElement("em")}} to indicate stress emphasis.
  • Use {{HTMLElement("strong")}} to indicate importance.
  • Use {{HTMLElement("mark")}} to indicate relevance.
  • Use {{HTMLElement("cite")}} to mark the name of a work, such as a book, play or song.
  • Use {{HTMLElement("dfn")}} to mark the defining instance of a term.

It is a good idea to use the class attribute to identify why the element is being used, so that if the presentation needs to change at a later date, it can be done selectively with style sheets.

Specifications

Specification Status Comment
{{SpecName('HTML WHATWG', 'text-level-semantics.html#the-i-element', '<i>')}} {{Spec2('HTML WHATWG')}}  
{{SpecName('HTML5 W3C', 'text-level-semantics.html#the-i-element', '<i>')}} {{Spec2('HTML5 W3C')}}  
{{SpecName('HTML4.01', 'present/graphics.html#h-15.2.1', '<b>')}} {{Spec2('HTML4.01')}}  

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 1.0 {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}

{{HTMLRef}}

Revision Source

<h2 id="Summary">Summary</h2>
<p>The <strong>HTML <code>&lt;i&gt;</code> Element</strong> represents a range of text that is set off from the normal text for some reason, for example, technical terms, foreign language phrases, or fictional character thoughts. It is typically displayed in italic type.</p>
<ul class="htmlelt">
 <li><dfn><a href="/en-US/docs/Web/HTML/Content_categories">Content categories</a></dfn> <a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">Flow content</a>, <a href="/en-US/docs/Web/HTML/Content_categories#Phrasing_content">phrasing content</a>, palpable content.</li>
 <li><dfn>Permitted content</dfn> <a href="/en-US/docs/Web/HTML/Content_categories#Phrasing_content">Phrasing content</a>.</li>
 <li><dfn>Tag omission</dfn> {{no_tag_omission}}</li>
 <li><dfn>Permitted parent elements</dfn> Any element that accepts <a href="/en-US/docs/Web/HTML/Content_categories#Phrasing_content">phrasing content</a>.</li>
 <li><dfn>DOM interface</dfn> {{domxref("HTMLElement")}} Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the {{domxref("HTMLSpanElement")}} interface for this element.</li>
</ul>
<h2 id="Attributes">Attributes</h2>
<p>This element only includes the <a href="/en-US/docs/Web/HTML/Global_attributes">global attributes</a>.</p>
<h2 id="Example">Example</h2>
<pre class="brush: html">
&lt;p&gt;The Latin phrase &lt;i&gt;Veni, vidi, vici&lt;/i&gt; is often mentioned in music, art, and literature&lt;/p&gt;
</pre>
<h3 id="Result" name="Result">Result</h3>
<p>The Latin phrase <em>Veni, vidi, vici</em> is often mentioned in music, art, and literature</p>
<h2 id="Notes">Notes</h2>
<p>In earlier versions of the HTML specification, the <code>&lt;i&gt;</code> tag was merely a presentational element used to display text in italics, much like the <code>&lt;b&gt;</code> tag was used to display text in bold letters. This is no longer true, as these tags now define semantics rather than typographic appearance. The <code>&lt;i&gt;</code> tag should represent a range of text with a different semantic meaning whose typical typographic representation is italicized. &nbsp;This means a browser will typically still display its contents in italic type, but is, by definition, no longer required to.</p>
<p>Use this element only when there is not a more appropriate semantic element. For example:</p>
<ul>
 <li>Use {{HTMLElement("em")}} to indicate stress emphasis.</li>
 <li>Use {{HTMLElement("strong")}} to indicate importance.</li>
 <li>Use {{HTMLElement("mark")}} to indicate relevance.</li>
 <li>Use {{HTMLElement("cite")}} to mark the name of a work, such as a book, play or song.</li>
 <li>Use {{HTMLElement("dfn")}} to mark the defining instance of a term.</li>
</ul>
<p>It is a good idea to use the <strong>class</strong> attribute to identify why the element is being used, so that if the presentation needs to change at a later date, it can be done selectively with style sheets.</p>
<h2 id="Specifications" name="Specifications">Specifications</h2>
<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('HTML WHATWG', 'text-level-semantics.html#the-i-element', '&lt;i&gt;')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', 'text-level-semantics.html#the-i-element', '&lt;i&gt;')}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML4.01', 'present/graphics.html#h-15.2.1', '&lt;b&gt;')}}</td>
   <td>{{Spec2('HTML4.01')}}</td>
   <td>&nbsp;</td>
  </tr>
 </tbody>
</table>
<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2>
<div>
 {{CompatibilityTable}}</div>
<div id="compat-desktop">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Chrome</th>
    <th>Firefox (Gecko)</th>
    <th>Internet Explorer</th>
    <th>Opera</th>
    <th>Safari (WebKit)</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>1.0</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
   </tr>
  </tbody>
 </table>
</div>
<div id="compat-mobile">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Android</th>
    <th>Firefox Mobile (Gecko)</th>
    <th>IE Phone</th>
    <th>Opera Mobile</th>
    <th>Safari Mobile</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
   </tr>
  </tbody>
 </table>
</div>
<p>{{HTMLRef}}</p>
Revert to this revision