Which CSS property can be used to configure italic text?

Text italicizing is most often used to call the reader’s attention to some word or sentence. It may also be used to quotations or just as a part of a specific design. Both CSS and HTML allow us to italicize text, so let’s look at both approaches to configure italic content.

Which CSS property can be used to configure italic text?

To configure italic text in CSS you should use font-style rule with italic value, as in the example below.

<p>Some sentence you want to configure italic text for</p>
p {
	font-style: italic;

How to configure italic text with HTML tags?

Of course, CSS is not the only option you can configure italic text. You can do this also just by using appropriate HTML tags. One of these tags is <em> tag which stands for emphasis. Browsers automatically italicize text wrapped in <em> tag.

<em>Text wrapped between "em" tags will be italicized</em>

The second HTML tag which can be used to configure italic text is just <i> tag that stands for italic. Same here, browsers will automatically display content inside <i> tag in italic.

<i>Text wrapped between "i" tags also will be displayed in intalic</i>

Now, you are able to configure italic text both in CSS and in HTML.

Leave a Reply

Your email address will not be published. Required fields are marked *