Tutorialspoint.dev

HTML | <i> Tag

The <i> tag in HTML is used to display the content in italic style. This tag is generally used to display the technical term, phrase, important word in a different language.

Syntax :

<i> Contents... </i>

Below programs illustrate the <i> tag in HTML:

Example 1:

<!DOCTYPE html>
<html>
    <head>
        <title>Italic Tag</title>
        <style>
            body {
                text-align:center;
            }
            h1 {
                color:green;
            }
        </style>
    </head>
    <body>
        <i><h1>GeeksforGeeks</h1></i>
        <h2><i><i> Tag</i></h2>
        <i>The text content are in italic font.</i>
    </body>
</html>                                                

Output:



Example 2: Using CSS property to display the italic contents.

<!DOCTYPE html>
<html>
    <head>
        <title>Italic Tag</title>
        <style>
            body {
                text-align:center;
                font-style:italic;
            }
            h1 {
                color:green;
            }
        </style>
    </head>
    <body>
        <h1>GeeksforGeeks</h1>
        <h2><i> Tag</h2>
        <p>The text content are in italic font.</p>
    </body>
</html>                    

Output:

Supported Browser: The browser supported by <i> tag are listed below:

  • Opera
  • Internet Explorer
  • Google Chrome
  • Firefox
  • Apple Safari


This article is attributed to GeeksforGeeks.org

leave a comment

code

0 Comments

load comments

Subscribe to Our Newsletter