Content that needs emphasis". For all browsers, this means that this text should be displayed in italics."/> Content that needs emphasis". For all browsers, this means that this text should be displayed in italics.">
Home > Article > Web Front-end > What is the use of the em tag in html?
In HTML, the function of the em tag is to tell the browser to express the text as emphasized content. The syntax format is "Content that needs emphasis". For all browsers, this means that this text should be displayed in italics.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer. The
tag tells the browser to represent the text within it as emphasized content. For all browsers, this means displaying this text in italics.
Adding emphasis to text also requires skill. If you emphasize too much, some important phrases will be missed; if you emphasize too little, you won't really highlight the important parts. It's the same with condiments that it's best not to overuse the emphasis.
Although the contents modified by tags are currently displayed in italics, these contents also have a broader meaning. One day in the future, browsers may also use other special effects to Display highlighted text. If you only want to italicize text, use the tag. In addition, documents can also include cascading style definitions that change the display of text.
In addition to emphasis, consider using the tag when introducing new terms or as a set style when referencing a specific type of term or concept.
Grammar:
<em>需要强调的内容</em>
Example:
<html> <head> <title>我的第一个 HTML 页面</title> </head> <body> <p>body 元素的内容会显示在浏览器中。</p> <em>我的第一个 HTML 页面</em> <p>title 元素的内容会显示在浏览器的标题栏中。</p> </body> </html>
Result:
##Extended information:
The above is the detailed content of What is the use of the em tag in html?. For more information, please follow other related articles on the PHP Chinese website!