HTML <em> tag


HTML <em> tag is used to stress emphasis the particular text within a sentence or phrase. It gives semantic meaning to the text contained within it and renders in the italic form on the browser.

Syntax:

<em>Write Important content here.....</em>  

Following are some specifications about the HTML <em> tag

DisplayInline
Start tag/End tagBoth Start and End tag
UsageTextual

Example:

<!DOCTYPE html>  
<html>  
<head>  
<title>Em Tag</title>  
    <style>  
          h2{  
                color:#ff7f50;  
                          }  
 </style>  
 </head>  
 <body>  
 <h2>Example of em Tag</h2>  
 <p>This is <em>HTML em tag</em> and it will emphasis the <em>important text</em> of the sentence</p>  
</body>  
</html>  

Output:

HTML em tag

Attribute

Tag-specific attribute

The <em> tag does not contain any specific attribute in HTML.

Global attribute

The <em> tag supports the global attributes in HTML

Event attribute

The HTML <em> tag supports the event attributes in HTML.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<em>YesYesYesYesYes

Leave a Reply

Your email address will not be published. Required fields are marked *