Open In App

How to Make Text Italic in HTML?

Last Updated : 17 Apr, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

The italic text in HTML can be done using the <em> (emphasis) tag or the <i> (italic) tag. Both tags are used to indicate that text should be displayed in italic form. Additionally, you can also use CSS style to text and make it italic. In this article, we will cover all approaches with examples to make text Italic.

Approach 1: Using the <em> Tag

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

HTML
<!DOCTYPE html>
<html>

<head>
    <title>Italic Text</title>
</head>

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

</html>

Output:

Welcome to GeeksforGeeks

Approach 2: Using the <i> Tag

The <i> tag is used to render 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
<!DOCTYPE html>
<html>

<head>
    <title>Italic Text</title>
</head>

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

</html>

Output:

Welcome to GeeksforGeeks

Approach 3: Using CSS Style

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

HTML
<!DOCTYPE html>
<html>

<head>
    <title>Italic Text</title>

    <style>
        .italic-text {
            font-style: italic;
        }
    </style>
</head>

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

</html>

Output:

Welcome to GeeksforGeeks

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads