Want to share your CSS expertise with others? Apply to the MDN Fellowship by April 1! http://mzl.la/MDNFellowship

mozilla
Your Search Results

    font-style

    Summary

    The font-style CSS property allows italic or oblique faces to be selected within a font-family.

    Syntax

    Formal syntax: normal | italic | oblique
    
    font-style: normal
    font-style: italic
    font-style: oblique
    
    font-style: inherit
    

    Values

    Italic forms are generally cursive in nature while oblique faces are typically sloped versions of the regular face. Oblique faces can be simulated by artificially sloping the glyphs of the regular face.

    normal
    Selects a font that is classified as normal within a font-family
    italic
    Selects a font that is labeled italic, if that is not available, one labeled oblique
    oblique
    Selects a font that is labeled oblique

    Example

    The example shows the different font-style values. The CSS looks like this:

    p.normal { font-style:normal } 
    p.italic { font-style:italic } 
    p.oblique { font-style: oblique }

    Specific​ations

    Specification Status Comment
    CSS Fonts Module Level 3
    The definition of 'font-style' in that specification.
    Candidate Recommendation No change.
    CSS Level 2 (Revision 1)
    The definition of 'font-style' in that specification.
    Recommendation No change.
    CSS Level 1
    The definition of 'font-style' in that specification.
    Recommendation Initial definition.

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
    Basic support 1.0 1.0 (1.7 or earlier) 4.0 7.0 1.0
    Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
    Basic support 1.0 1.0 (1) 6.0 6.0 1.0

    See also

    Document Tags and Contributors

    Last updated by: teoli,