HTML and CSS Reference
Adding style to your fonts
You're familiar with italic text, right? Italic text
is slanted, and sometimes has extra curly serifs.
For example, compare these two styles:
The italic text is sl anted to t he r ight
Italic and oblique
styles are two styles
that give fonts a
and has e xtra curls on t he se rifs.
You can add an italic style to your text in
CSS using the font-style property:
A commo n mistake i s to
write “it alic” as “it alics”.
If you d o, you won't see
italic te xt. So reme mber
to check your spelli ng.
Unless you can control
the fonts and browsers
your visitors are
using, you'll find that
sometimes you get italic,
and sometimes oblique,
no matter which style
However, not all fonts support the italic style,
so what you get instead is called oblique text.
Oblique text is also slanted text, but rather
than using a specially designed slanted set of
characters in the font, the browser just applies
a slant to the normal letters. Compare these
non-oblique and oblique styles:
The r egular letters are
slant ed to the right in
the o blique style.
You can use the font-style property
to get oblique text too, like this:
So just go with italic
and don't worry about
the differences (you
probably can't control
In practice, you're going to find that, depending
on your choice of font and browser, sometimes
the two styles will look identical, and sometimes
they won't. So, unless italic versus oblique is
very important to you, choose one and move
on. If it is important, you'll need to test your
font and browser combination for the best