Name

<I> — NN all IE all HTML all

Synopsis

<I>...</I>

End Tag: Required

The I element—one of several font style elements in HTML 4.0—renders its content in an italic version of the font face governing the next outermost HTML container. You can nest multiple font style elements to create combined styles, such as bold italic (<B><I>bold-italic text</I></B>).

It is up to the browser to italicize a system font or perhaps load an italic version of the currently specified font. If you are striving for font perfection, it is best to use style sheets (and perhaps downloadable fonts) to specify a true italic font face, rather than risk the browser’s extrapolation of an italic face from a system font.

You can take advantage of the containerness of this element by assigning style sheet rules to some or all I elements in a page. For example, you may wish all I elements to be in a red color. By assigning the style rule I{color:red}, you can do it to all elements with only a tiny bit of code.

Although this element is not deprecated in HTML 4.0, it would not be surprising to see it lose favor to the font-style: style sheet attribute in the future.

Example

<P>This product is <I>new</I> and <I>improved</I>!</P>

Object Model Reference

IE

[window.]document.all.elementID

Attributes

CLASS

ID

LANGUAGE

STYLE

TITLE

DIR

LANG

   

Event Handler Attributes

Handler

NN

IE

HTML

onClick

n/a

4

4

onDblClick

n/a

4

4

onDragStart

n/a

4

n/a

onHelp

n/a

4

n/a

onKeyDown

n/a

4

4

onKeyPress ...

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.