HTML Italic Tag

Tags for showing the text in italics format

You might have seen some kind of text written in italics on some websites. If we want to show some text on our web page in italic, we can make use of the i tag. The content between the <i> and </i> is displayed as italic. Alternatively, you can also use the em tag. The content between <em> and </em> is shown in italic.

The em tag is used to emphasize the text. Have a look at the below example, to understand, how are we making the text italic.

<!DOCTYPE html>
<html lang=”en”>
<head>
    <meta charset=”UTF-8″>
    <meta http-equiv=”X-UA-Compatible” content=”IE=edge”>
    <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
    <title>Some heading here…</title>
</head>
<body>
   <div>here is some text, <i>in italics</i>, and also some text, <em>within the em tag</em></div>
</body>
</html>

If we try to open the file in the browser, we find that the text between the <i> and </i> is italic now. Same with the text between the <em> and </em>. If you ever need to display some text as italic on the web page, you can do something like this. Remember that the em tag is used to define some emphasized text. Have a look at the output →