Publish in HTML Tutorial el 24/05/2025 15:33
The HTML <i>
element represents a range of text that is set off from the normal text for some reason. The content is typically displayed in italic type. While this element was often used simply to apply italic styling in the past, in HTML5 it has semantic meaning and should be used to represent text that is in an alternate voice or mood, or otherwise offset from the normal prose.
Common use cases for <i>
include:
<cite>
may be more appropriate)Here's how the basic <i>
element looks in code:
And here's how it renders:
This is italicized text within a paragraph.
The <i>
element is perfect for marking foreign words or phrases:
Use <i>
to highlight technical terms when they first appear:
The <i>
element can represent a character's thoughts in fiction:
Here's how you can toggle italic styling with JavaScript:
This example shows how <i>
can be combined with other semantic elements:
<i>
just for visual styling - use CSS for that purpose (font-style: italic
).lang
attribute when marking foreign words.<em>
instead, as it carries semantic meaning for screen readers.<cite>
which is more semantically appropriate.<i>
with other semantic elements when appropriate.Screen readers typically don't announce <i>
elements differently unless they contain semantic information (like the lang
attribute). If you're trying to convey emphasis, use <em>
instead, as screen readers will change their tone when encountering emphasized text.
The <style> HTML element contains style information for a document, or part of a document. ...
The <strong> element is used to indicate that its content has strong importance, seriousnes...
The <span> element is an inline container used to mark up a part of a text or document. Unl...
The <source> element is used to specify multiple media resources for media elements like &l...
The <small> element is used to represent side-comments and small print, typically for discl...
HTML <section> Element: The Complete Guide The <section> element is a semantic HTML ...