I am learning CSS. I tried to make some text italic. But the text are not going italic. Where is the problem?
.bold {
font-weight: bold;
}
.italic {
font-weight: italic;
}
<p>This is some text</p>
<p class="bold">This is some bold text</p>
<p class="italic">This is some italic text</p>
You can't set italics using a CSS command called font-weight
.
Try using font-style: italic
instead.
.bold {
font-weight: bold;
}
.italic {
font-style: italic;
}
<p>This is some text</p>
<p class="bold">This is some bold text</p>
<p class="italic">This is some italic text</p>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With