Home  >  Article  >  Web Front-end  >  How to remove italic style in css

How to remove italic style in css

青灯夜游
青灯夜游Original
2021-04-15 18:31:243524browse

In CSS, you can use the font-style attribute to remove the italic style. You only need to set the "font-style: normal;" style to the element. The font-style attribute can specify the font style of text. When the value is set to "normal", the browser displays a standard font style.

How to remove italic style in css

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

In HTML, the i tag comes with italic style by default

<p>
	正常字体<br />
	<i>测试字体</i>
</p>

Rendering:

How to remove italic style in css

How to remove it Italic style for i tag? You can use the font-style attribute, syntax:

i{
font-style: normal;
}

Rendering:

How to remove italic style in css

##css font-style attribute

The font-style attribute specifies the font style of the text.

Attribute value:

ValueDescriptionnormaldefault value. The browser displays a standard font style. italicThe browser will display an italic font style. obliqueThe browser will display an oblique font style. inherit Specifies that the font style should be inherited from the parent element.
(Learning video sharing:

css video tutorial)

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

Statement:
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