Constructor
Constructor

Reputation: 7493

Upright shape of font for text inside <i></i> tags in HTML

The text inside HTML tag pair <i> </i> becomes italic. Is it a way to make a part of it non-italic, revert an upright shape of font? Something like \textup command in LaTeX:

<i>Long italic text <upright>small upright part</upright> italic text again</i>

Upvotes: 0

Views: 171

Answers (2)

Salman Abir
Salman Abir

Reputation: 182

try this, it will solve your problem.

<i>Long italic text <upright style="font-style: normal;">small upright part</upright> italic text again</i>

Upvotes: 2

Temani Afif
Temani Afif

Reputation: 274024

Simply define it to work that way:

upright {
  font-style:initial;
}
<i>Long italic text <upright>small upright part</upright> italic text again</i>

Upvotes: 1

Related Questions