Open In App

How to render as emphasized text using HTML ?

Last Updated : 31 Dec, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

The <em> tag in HTML is a phrase tag and used to emphasize the text content. It is similar to <italic> tag. The main difference between these two tag is the <em> tag semantically emphasizes on the important word or section of words while <i> tag is just offset text conventionally styled in italic to show alternative mood or voice.

Note: This effect can be achieved by using CSS property.

Syntax:

<em> Contents... </em>

Example 1: This example uses <em> tag to create emphasized text.

HTML




<!DOCTYPE html>
<html>
 
<head>
    <title>
        How to render as emphasized
        text using HTML?
    </title>
</head>
 
<body style="text-align: center;">
    <h1 style="color:green;">
        GeeksforGeeks
    </h1>
 
    <h3>
        How to render as emphasized
        text using HTML?
    </h3>
 
    <em>Emphasized text content</em>
</body>
 
</html>


Output:

Example 2: This example uses <em> tag with title attribute to create emphasized text.

HTML




<!DOCTYPE html>
<html>
 
<head>
    <title>
        How to render as emphasized
        text using HTML?
    </title>
</head>
 
<body style="text-align: center;">
    <h1 style="color:green;">
        GeeksforGeeks
    </h1>
 
    <h3>
        How to render as emphasized
        text using HTML?
    </h3>
 
    <em title="Emphasized text">
        Emphasized text content
    </em>
</body>
 
</html>


Output:

Supported Browsers:

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


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

Similar Reads