Open In App

How to Make Text Italic in HTML?

Last Updated : 29 Oct, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

To make the text italic in HTML, we can either use <i> or <em> tag. Both tags make the text italic but used for different purposes. The <i> tag is used to make the text italic without semantic meaning while <em> makes the text italic with semantic importance, improving accessibility and meaning in content.

Italic Text in HTML using i Tag

The <i> tag is used to render the text in italic form, but it does not imply any special emphasis like the <em> tag. The <i> tag is generally used to display the technical term, phrase, the important word in a different language. 

HTML
<p>Welcome to <i>GeeksforGeeks</i></p>

Output

Welcome to GeeksforGeeks

Italic Text in HTML using em Tag

The <em> tag is used to emphasize the text. By default, it rendering text in italic style. It conveys the importance or stress semantically and is widely employed for emphasis within paragraphs or sentences.

HTML
<p>Welcome to <em>GeeksforGeeks</em></p>

Output:

Welcome to GeeksforGeeks

Italic text in CSS using font-style Property

You can also use CSS to style text and make it italic. It gives more controls over the appearance of the text. The CSS font-style property is used to make the text italic.

HTML
<p>Welcome to <span class="italic-text">GeeksforGeeks</span></p>

Output

Welcome to GeeksforGeeks

Which One Should You use - <i>,<em> or font-style ?

There are three different options to make the text italic, but these have different use cases -

  • The <em> tag can be used to make the text italic with some semantic meaning of content.
  • The <i> tag can be used to make the text italic without emphasis.
  • The CSS font-style property can be used to make the text italic with greater styling control.

Next Article
Article Tags :

Similar Reads