Back to the html tags list
HTML <i> Tag / HTML <em> Tag
The <i> tag/<em> tag are used to make italic and 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
Details for Common html Attributes.
Common attributes for the em tag
class, style, id, title, dir, lang, xml:lang
Details for Common html Attributes.
Javascript Event attributes for the strong and b tag
onmousedown, onmouseup, onclick, ondblclick, onmouseover, onmouseout, onmousemove, onkeydown, onkeyup, onkeypress
Details for Javascript Event Attributes.
Back to the html tags list

