HTML Italics Tags

The <i> tag/<em> tag are used to make italic or emphasized text, the text will become slanted and thinner then normal text.

Where/how To Use The <i>/<em> Tag

Use in head or body section? body
Inline or Block level tag? Inline
HTML Tag Syntax? <start tag>CONTENT</end tag>
XHTML Tag Syntax? <start tag>CONTENT</end tag>

Example

Code Output
<i>italic text</i> bold text
<em>emphasized text</em> emphasized text

Notes

  • Most browsers display <em> the same as <i>
  • There are no differences between XHTML and HTML for this tag
  • <em> and <i> display text as italic

Common attributes for the i tag

class, style, id, title, dir, lang

Common attributes for the em tag

class, style, id, title, dir, lang, xml:lang

Javascript Event attributes for the i and em tag

onmousedown, onmouseup, onclick, ondblclick, onmouseover, onmouseout, onmousemove, onkeydown, onkeyup, onkeypress

Comments