i Element


 

Module

The i element is an inline element declared by the XHTML 1.1 Presentation Module (Inline Presentation)

Elements in the Presentation Module are:
big | small | sub | sup | i | b | tt (Inline Presentation Support Module)
hr (Block Presentation Support Module)

Description

The i element indicates that a section of text is to be rendered in italics.

For example:

<p>This is <i>italicized text</i> embedded in a normal paragraph.</p>

This code is rendered as follows:

This is italicized text embedded in a normal paragraph.

In many instances, the use of this element is discouraged in favour of a more semantically informative element, which also has meaning in non-visual browsers. For instance, i would in most cases be better substituted by em unless the italicization has only visual significance and is not meant to place any additional emphasis upon the text. However, if it's only for visual effect, then the italicizing would be better controlled using CSS, so that content and presentation are well separated; personally I would not use the i element, but instead the CSS declaration font-style:italic.

See also the b element.

#REQUIRED Attributes

There are no #REQUIRED attributes on the i element.


Specific Attributes

There are no specific attributes declared on the i element.


Common Attributes

Common attributes of the i element are listed below:

From the Core Attribute Collection

class [ type NMTOKENS ]
One or more space separated classes
id [ type ID ]
A unique identifier for the element
style [ type CDATA ], from the Style Attribute Module (deprecated)
Element-specific styles
title [ type Text ]
Descriptive title for the element (in some user agents this may appear as a "tooltip" when the mouse hovers over the element)
xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]
XML namespace

From the I18N Attribute Collection

dir [ type Enumeration (ltr | rtl) ], from the Bi-directional Text Module
Left-to-right or right-to-left directionality
xml:lang [ type LanguageCode ]
A language code for the element

From the Events Attribute Collection

All attributes in the Events Attribute Collection are supported:
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup


Content Model

The Content Model for the i element is:

( #PCDATA | Inline.mix )*

See Content Model & Nesting for information about Content Model syntax and Nesting Groups.

Valid children of i

Valid parents of i


Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 01 Oct 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > XHTML 1.1 Indexes > Element Index (XHTML 1.1) > i Element