How to remove italic style from em tag in css

WBOY
Release: 2021-12-07 16:51:32
Original
6121 people have browsed it

In CSS, you can use the "font-style" attribute to remove the italic style of the em tag. The function of this attribute is to define the style of the font. When the value of the attribute is "normal", the font is displayed in the standard style. , that is, the italic style is removed, and the syntax is "em{font-style:normal;}".

How to remove italic style from em tag in css

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

How to remove the italic style of the em tag in css

In css, you can use the font-style attribute to remove the italic style of the em tag. The font-style attribute defines the style of the font. When the value of the attribute is normal, the font style is the standard style.

How to remove italic style from em tag in css

The example is as follows:

<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <meta http-equiv="X-UA-Compatible" content="ie=edge">
   <title>Document</title>
   <style>
  .em1{
   font-style:normal;
  }
</style>
</head>
<body>
<em class="em1">这是一段文字</em><br>
   <em>这是一段文字</em>
</body>
</html>
Copy after login

Output result:

How to remove italic style from em tag in css

(Learning video sharing : css video tutorial)

The above is the detailed content of How to remove italic style from em tag in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template