Skip to main content

HTML Guide

Free site validation

Find out what web pages on your sites are affected by HTML issues.

CSS: “font-style”: X is not a “font-style” value.

The font-style CSS property sets whether a font should be styled with a normal, italic, or oblique face from its font-family.

Here are examples of valid font-style values:

font-style: normal;
font-style: italic;
font-style: oblique;
font-style: oblique 10deg;

/* Global values */
font-style: inherit;
font-style: initial;
font-style: revert;
font-style: revert-layer;
font-style: unset;

A common issue is trying to use font-style to define the size, when font-size should have been used instead, for example:

/* Invalid */
font-style: 1.2em;

/* Valid */
font-size: 1.2em;

Learn more:

Related W3C validator issues