HTML em tag

<em> tag defines the stress emphasis of content. The placement of em element changes the meaning of the sentence. But the text actually looks like italic.

Example

<p><em>Hummingbird</em> is a cute bird.</p>
<p>Hummingbird are among the <em>smallest</em> birds.</p>
Try </>

Specific uses

Here a question may arise.

Why do we use em element instead of i element?

The purpose of em element is not to italic the text but it has special meaning.For this purpose I is present.

The position of em element in a text changes the meaning of line by emphasising stress on a term. For instance,

The placement of <em> in the following paragraph leaves us with a question whether humingbird or other kind of bird is the smallest bird.


<p><em>Hummingbird</em> is the smallest bird.</p>

The following example leaves us with a question whether humingbird is small or not.


<p>Hummingbird <em>is</em> the smallest bird.</p>

The following example leaves us with a question whether it is a bird or animal.


<p>Hummingbird is the smallest <em>bird<em>.</p>

Summary Example

Example

<p><em>Hummingbird</em> is the smallest bird.</p>
 <p>Hummingbird <em>is</em> the smallest bird.</p>
 <p>Hummingbird is the smallest <em>bird<em>.</p>

Try</>

Tag omission

Both starting and ending tags are necessary for the em element.

Global Attributes

All the global attributes are applicable on the em element.



Was this article helpful?

 

Email:

Message:

Get the newsletter