CSS PROPERTIES
Expand All | Collapse All
CSS AT-RULES

CSS font-style Property

Topic: CSS3 Properties ReferencePrev|Next

Description

This font-style CSS property defines the style of font for the element's text content.

The following table summarizes the usages context and the version history of this property.

Default value: normal
Applies to: All elements
Inherited: Yes
Animatable: No. See animatable properties.
Version: CSS 1, 2, 3

Syntax

The syntax of the property is given with:

font-style: 
normal | italic | oblique | initial | inherit

The example below shows the font-style property in action.

p {
    font-style: italic;
}

Property Values

The following table describes the values of this property.

Value Description
normal Selects a font that is classified as normal in the user agent's font database.
italic Selects a font that is labeled italic in the user agent's font database, if that is not available, it will use one labeled oblique.
oblique Selects a font that is labeled oblique in the user agent's font database.
inherit If specified, the associated element takes the computed value of its parent element font-style property.

Note: If no italic or oblique faces are available, an oblique face can be synthesized by rendering the normal face with a slanting transformation applied to them.


Browser Compatibility

The font-style property is supported in all major modern browsers.

Browsers Icon

Basic Support—

  • Firefox 1+
  • Google Chrome 1+
  • Internet Explorer 4+
  • Apple Safari 1+
  • Opera 7+

Further Reading

See tutorial on: CSS Fonts, CSS Text.

Related properties and at-rules: font, font-variant, font-weight, font-size, line-height, font-family, @font-face.

Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties