English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML: <em> Tag

The HTML <em> tag is used to emphasize text, which usually means that the browser displays the text in italics. This tag is also commonly referred to as the <em> element.

Online example

Formatting text in the document:

!doctype html
<html
<head
<meta charset="UTF-8">
<title>HTML5 dt tag usage (Basic Tutorial Website oldtoolbag.com)</title>/title>
</head>
<body
<h1>Heading 1</h1>
<p>We want to stress emphasize <em>this text</em>/em></p>
</body>
</html>
Test to see ‹/›
In this HTML5In the document example, we created an <em> tag that encloses the text 'this text'. By default, your browser will display 'this text' as italic text. You can use CSS to override this behavior.

Browser compatibility

IEFirefoxOperaChromeSafari

All mainstream browsers support the <em> tag.

Definition and Usage Description of Tags

The <em> tag is a phrase tag used to present text as emphasized.

Tip: We are not against using this tag, but if you are using it only to achieve a certain visual effect, we recommend using CSS, which may produce richer effects.

All phrase tags:

TagDescription
<em>Presented as emphasized text.
<strong>Define important text.
<dfn>Define a definition item.
<code>Define computer code text.
<samp>Define sample text.
<kbd>Define keyboard text. It indicates that the text is typed from the keyboard. It is often used in documents or manuals related to computers.
<var>Define variables. You can use this tag in conjunction with <pre> and <code> tags.
The <em> tag is used to separate text from the rest of the content. By default, browsers display the text within the <em> tag in italics. You can use CSS to change this behavior.

Global Attributes

Support for <em> tag Global Attributes of HTML.

Event Attributes

Support for <em> tag HTML Event Attributes.

Related Articles

HTML Tutorial:HTML Text Formatting