How to emphasize text in a document using HTML5 ?

In this article, we will emphasize the text in an HTML document by using the <em> element in the document. It is a phrase tag and used to emphasize the text content.

Syntax:

<em> Contents... </em>

Example 1:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <title>
        Emphasize text in 
        an HTML document
    </title>
</head>
  
<body>
    <h1>GeeksforGeeks</h1>
  
    <h2>
        HTML5: How to emphasize
        text in an HTML document?
    </h2>
  
    <em>Emphasized text content</em>
</body>
  
</html>

chevron_right


Output:

Example 2:



filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <meta http-equiv="Content-Type"
        content="text/html; 
        charset=iso-8859-1">
  
    <title>
        HTML5: How to emphasize
        text in an HTML document?
    </title>
</head>
  
<body>
    <h1>GeeksForGeeks</h1>
  
    <h2>
        HTML5: How to emphasize 
        text in an HTML document
    </h2>
      
    <strong>
        <em>HTML CSS Exercise</em>
    </strong>
</body>
  
</html>

chevron_right


Output:

Supported Browsers:

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

full-stack-img




My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.