Italics in HTML can be rendered using the HMTL i tag <i>.
Apart from displaying Italics in HTML the i <i> tag in HTML can also be used to indicate a foreign language, a quotation or any name.
HTML i Tag <i> is a closed tag and needs to be closed via closing HTML i tag </i>.
Syntax of writing Italics in HTML using HTML i tag
<i> Some text here </i>
Example of writing Italics in HMTL using HTML i tag
HTML i Tag Code | Output |
<br /> <p> The name of my puppy is </p><br /> <i>Miss. Beautiful </i> <p> because she is too cute</p><br /> |
The name of my puppy is Miss. Beautiful because she is too cute |
Here in the above HTML i tag example we can see that the name of the puppy “Miss. Beautiful” is displayed in italics and that’s how we can write Italics in HTML.
Note: HTML i tag should be used only when nothing else from below list can be used.
- <em>
- <strong>
- <mark>
- <cite>
- <dfn>
HTML i Tag supports all HTML Global Attributes and HTML Event Attributes.
HTML i Tag Supporting Browsers
S. No. | Browser | Supported(Yes/No) |
1 | Internet Explorer | Yes |
2 | Firefox | Yes |
3 | Google Chrome | Yes |
4 | Opera | Yes |
5 | Safari | Yes |