O'Reilly logo

Dynamic HTML: The Definitive Reference by Danny Goodman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required