10 July 2009

Set CSS font-style to your text

Font-style is basically just the style for making the font italic. There is by default three settings you can use:

  • normal
  • italic
  • oblique
Zendweaves font-style

There is not much difference between italic or oblique. Both look the same. I think it's mainly there for classification. Anyway, here's the spec for font-style as by w3c:

'font-style'
    Value:           normal | italic | oblique | inherit
    Initial:           normal
    Applies to:   all elements
    Inherited:   yes
    Percentages:   N/A
    Media:           visual
    Computed value:   as specified

The 'font-style' property selects between normal (sometimes referred to as "roman" or "upright"), italic and oblique faces within a font family.

A value of 'normal' selects a font that is classified as 'normal' in the UA's font database, while 'oblique' selects a font that is labeled 'oblique'. A value of 'italic' selects a font that is labeled 'italic', or, if that is not available, one labeled 'oblique'.

The font that is labeled 'oblique' in the UA's font database may actually have been generated by electronically slanting a normal font.

Fonts with Oblique, Slanted or Incline in their names will typically be labeled 'oblique' in the UA's font database. Fonts with Italic, Cursive or Kursiv in their names will typically be labeled 'italic'.

Take care
Tjorriemorrie

No comments:

Post a Comment