Support0

CSS font-style playground

Explore font-style with controls to request styles and angles on real text; rendering depends on available faces and the browser.

Ask AI

CSS font-style playground

Response generated with openai/gpt-5.4-nano. AI can make mistakes. Always review the result.

BaselineLab lets you compare font-style with real text, italic, oblique and angle requests before copying the CSS. The result depends on available faces, permitted synthesis and the browser.

HTML
<p class="font-style-sample">
  BaselineLab lets you compare font-style with real text,
  italic, oblique and angle requests before copying the CSS.
  The result depends on available faces, permitted synthesis and the browser.
</p>
Tailwind CSS
Examples for Tailwind CSS 4.3 with the default theme. Custom values keep arbitrary classes when there is no equivalent utility. Changing the theme can change utility values.
<p class="max-w-xl text-2xl leading-normal italic">
  BaselineLab lets you compare font-style with real text,
  italic, oblique and angle requests before copying the CSS.
  The result depends on available faces, permitted synthesis and the browser.
</p>
CSS
.font-style-sample {
  max-inline-size: 36rem;
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.5;
}

Educational guide to font-style

Italic, oblique and the font behind them

Compare styles, angles, designed faces and synthesis. Learn what CSS requests and what depends on the font, its files and the browser.

Mental model

font-style requests a style within a family. The browser selects from its available faces and may synthesize a slant when the requested style is missing. The declaration does not create a designed italic or add axes to a font.

  1. Request a style

    normal, italic or oblique, with an optional angle for oblique.

  2. Match a face

    Check the styles and ranges offered by the family’s resources.

  3. Draw the glyphs

    Use the chosen face, any necessary fallback and permitted synthesis.

Request, matching and renderingStatic diagram. A different computed value does not prove that the file changed or that the exact angle is being drawn.

normal, italic and oblique

italic seeks an italic face; oblique, a slanted face. A designed italic may change letter shapes such as a or f. An oblique usually retains more of the upright design, but it can also be a designed face rather than a browser deformation.

Three requests on the same text

font-style: normal

Aa fg · Letter shapes matter too.

font-style: italic

Aa fg · Letter shapes matter too.

font-style: oblique

Aa fg · Letter shapes matter too.

The same size and Georgia or serif family. italic and oblique may end up using the same face or a synthetic slant; three declarations do not guarantee three different outlines.
Three requests on the same text
<div class="font-style-guide-values">
  <div>
    <p class="label">font-style: normal</p>
    <p class="sample normal">Aa fg · Letter shapes matter too.</p>
  </div>
  <div>
    <p class="label">font-style: italic</p>
    <p class="sample italic">Aa fg · Letter shapes matter too.</p>
  </div>
  <div>
    <p class="label">font-style: oblique</p>
    <p class="sample oblique">Aa fg · Letter shapes matter too.</p>
  </div>
</div>
.font-style-guide-values {
  display: grid;
  gap: 1rem;
  overflow-wrap: anywhere;

  .label {
    margin-block: 0 0.5rem;
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
  }

  .sample {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
  }

  .normal {
    font-style: normal;
  }

  .italic {
    font-style: italic;
  }

  .oblique {
    font-style: oblique;
  }
}

The property is inherited and starts at normal. Appearance does not replace semantics: use em for stress emphasis and i where its HTML meaning fits, such as an alternative voice or a technical term. Making a paragraph italic adds neither meaning. Keep slanted styles to readable passages.

Angles: request versus result

oblique without an angle requests 14deg. Angles from −90deg to 90deg are accepted, including decimals; in horizontal text, positive angles lean right and negative angles lean left. These are syntax limits, not reading recommendations or a range guaranteed by every font.

One regular face and four requested angles

font-style: oblique -20deg

Aa fg · Letter shapes matter too.

font-style: oblique 0deg

Aa fg · Letter shapes matter too.

font-style: oblique 10deg

Aa fg · Letter shapes matter too.

font-style: oblique 20deg

Aa fg · Letter shapes matter too.

Each label shows the request. With syntax support, −20, 0, 10 and 20 degrees apply; otherwise all retain oblique. Some rows may look identical because of the engine’s synthesis limitations. No transform is used to simulate slant.
One regular face and four requested angles
<div class="font-style-guide-angles">
  <div>
    <p class="label">font-style: oblique -20deg</p>
    <p class="sample angle-0">Aa fg · Letter shapes matter too.</p>
  </div>
  <div>
    <p class="label">font-style: oblique 0deg</p>
    <p class="sample angle-1">Aa fg · Letter shapes matter too.</p>
  </div>
  <div>
    <p class="label">font-style: oblique 10deg</p>
    <p class="sample angle-2">Aa fg · Letter shapes matter too.</p>
  </div>
  <div>
    <p class="label">font-style: oblique 20deg</p>
    <p class="sample angle-3">Aa fg · Letter shapes matter too.</p>
  </div>
</div>
@font-face {
  font-family: "StyleGuideRegularOnly";
  src: local("Georgia");
  font-style: normal;
  font-weight: 400;
}

.font-style-guide-angles {
  display: grid;
  gap: 1rem;
  overflow-wrap: anywhere;

  .label {
    margin-block: 0 0.5rem;
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
  }

  .sample {
    margin: 0;
    font-family: "StyleGuideRegularOnly", serif;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
  }

  .sample {
    font-style: oblique;
    font-synthesis: style;
  }

  @supports (font-style: oblique 10deg) {
    .angle-0 {
      font-style: oblique -20deg;
    }

    .angle-1 {
      font-style: oblique 0deg;
    }

    .angle-2 {
      font-style: oblique 10deg;
    }

    .angle-3 {
      font-style: oblique 20deg;
    }
  }
}

@supports only checks syntax acceptance. MDN BCD records partial angle support in Chromium and Safari: in the documented cases, 14–90 renders as a 14-degree oblique and −90–13 as normal. Check the rendering in your browsers and font; the lab limits exploration to −30–30, not the standard.

These scenes use local(), without font downloads. If local names are missing or access is blocked, serif is used and the controlled comparison is no longer guaranteed. CSS.supports and getComputedStyle alone do not identify the rendered face or its origin.

Real faces and @font-face descriptors

On an element, font-style requests a style. In @font-face, the descriptor identifies what the resource offers. Register normal and italic under the same family name, using descriptors that match each file.

A family with local regular and italic faces

font-style: normal

Aa fg · Letter shapes matter too.

font-style: italic

Aa fg · Letter shapes matter too.

font-style: oblique

Aa fg · Letter shapes matter too.

If Georgia and Georgia-Italic are available, normal selects regular and italic selects italic. Without an oblique face, oblique may fall back to italic. Synthesis is disabled: a slanted row does not prove that the browser manufactured it.
A family with local regular and italic faces
<div class="font-style-guide-matching">
  <div>
    <p class="label">font-style: normal</p>
    <p class="sample normal">Aa fg · Letter shapes matter too.</p>
  </div>
  <div>
    <p class="label">font-style: italic</p>
    <p class="sample italic">Aa fg · Letter shapes matter too.</p>
  </div>
  <div>
    <p class="label">font-style: oblique</p>
    <p class="sample oblique">Aa fg · Letter shapes matter too.</p>
  </div>
</div>
@font-face {
  font-family: "StyleGuideStatic";
  src: local("Georgia");
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "StyleGuideStatic";
  src: local("Georgia-Italic");
  font-style: italic;
  font-weight: 400;
}

.font-style-guide-matching {
  display: grid;
  gap: 1rem;
  overflow-wrap: anywhere;

  .label {
    margin-block: 0 0.5rem;
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
  }

  .sample {
    margin: 0;
    font-family: "StyleGuideStatic", serif;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
  }

  .sample {
    font-synthesis: none;
  }

  .normal {
    font-style: normal;
  }

  .italic {
    font-style: italic;
  }

  .oblique {
    font-style: oblique;
  }
}

Declaring italic on a regular file does not redesign its glyphs. Check the file, its descriptors and the rendered font in browser tools. Style matching allows alternatives within the family; do not assume that a missing style requires the next family.

These scenes use local(), without font downloads. If local names are missing or access is blocked, serif is used and the controlled comparison is no longer guaranteed. CSS.supports and getComputedStyle alone do not identify the rendered face or its origin.

Designed faces versus synthesis

Allowing synthesis does not force it. When italic is missing, the browser may slant a regular face; disabling this does not load the missing face. The result may retain upright outlines even though the computed value remains italic.

Regular only, two permissions for italic

Style synthesis allowed · italic

Aa fg · Letter shapes matter too.

Synthesis disabled · italic

Aa fg · Letter shapes matter too.

The alias advertises only Georgia regular. The first row permits style synthesis and the second prohibits it. With that resource available, you can compare artificial slant with upright outlines without changing the italic request.
Regular only, two permissions for italic
<div class="font-style-guide-synthesis">
  <div>
    <p class="label">Style synthesis allowed · italic</p>
    <p class="sample">Aa fg · Letter shapes matter too.</p>
  </div>
  <div>
    <p class="label">Synthesis disabled · italic</p>
    <p class="sample no-synthesis">Aa fg · Letter shapes matter too.</p>
  </div>
</div>
@font-face {
  font-family: "StyleGuideRegularOnly";
  src: local("Georgia");
  font-style: normal;
  font-weight: 400;
}

.font-style-guide-synthesis {
  display: grid;
  gap: 1rem;
  overflow-wrap: anywhere;

  .label {
    margin-block: 0 0.5rem;
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
  }

  .sample {
    margin: 0;
    font-family: "StyleGuideRegularOnly", serif;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
  }

  .sample {
    font-style: italic;
    font-synthesis: style;
  }

  .no-synthesis {
    font-synthesis: none;
  }
}

font-synthesis: style allows only style synthesis; none disables all synthesis. To change just the style permission, use font-synthesis-style: auto or none and check support. Do not disable synthesis globally without reviewing emphasis when resources are missing.

Check accents, punctuation, fallback and text resized to 200%. Do not clip slanted strokes with rigid boxes or hidden overflow. Italic does not guarantee legibility in every script; preserve meaning in HTML and review reading in context.

Variable fonts: ital and slnt

ital and slnt are different capabilities. ital distinguishes roman (0) and italic (1); slnt controls slant. A variable font may lack both. Many families distribute regular and italic in separate files, even when each file is variable in weight.

Reference recipe · requires your font with a slnt axis

Reference recipe · requires your font with a slnt axis
<p class="font-style-guide-variable">Aa fg · Letter shapes matter too.</p>
@font-face {
  font-family: "ExampleSlant";
  src: url("/fonts/example-slant.woff2") format("woff2");
  font-style: oblique 0deg 20deg;
  font-weight: 400;
  font-display: swap;
}

.font-style-guide-variable {
  font-family: "ExampleSlant", sans-serif;
  font-size: 1.25rem;
  font-style: oblique;
  line-height: 1.6;
  overflow-wrap: anywhere;

  @supports (font-style: oblique 12deg) {
    font-style: oblique 12deg;
  }
}

This recipe does not run or download the example file. Replace the URL with a weight-400 font whose slnt axis spans −20 to 0, or adapt the descriptors to its actual range. @font-face advertises oblique 0deg 20deg; the paragraph requests one angle. The two-angle range belongs to the descriptor, not the element property.

Prefer font-style to fixing axes with font-variation-settings. A low-level ital or slnt setting can override the property. The slnt sign is opposite to the CSS angle: a CSS slant of 12deg corresponds to slnt −12. Do not copy the same number between both APIs or confuse ital with an angle.

Common mistakes

italic and oblique look identical

Expected result
Understand which face draws each request.
Cause
Matching ends up on the same face, or only a regular face with synthesis is available.
Solution
Inspect rendered fonts and synthesis permissions. Load the intended faces and check their descriptors.

The angle changes, the outline does not

Expected result
Render the requested slant.
Cause
The engine accepts syntax with rendering limitations, the slnt range is missing or a low-level rule fixes the axis.
Solution
Check the engine, file and active rules. Keep oblique as a fallback and verify the visual result; do not claim full support based on CSS.supports.

Italic looks like slanted regular

Expected result
Use a designed italic.
Cause
The italic face has not loaded, is registered incorrectly or synthesis is allowed on regular.
Solution
Load and register the correct italic. Decide whether to allow synthesis as a fallback and check that emphasis remains readable.

Support and compatibility

MDN classifies font-style as Baseline Widely Available, with support differences in some parts. Keywords, angles, @font-face ranges and synthesis permissions need separate evaluation.

BCD records angled oblique since Chrome 62 and Safari 11.1 with limitations, and Firefox 61 without that partial-support flag. font-synthesis-style and its values have their own compatibility; the guide uses auto/none and does not depend on the additional oblique-only value.

The four scenes are native HTML/CSS, independent of the playground and understandable without JavaScript. The variable recipe is a reference rather than a verified preview. Neither value acceptance nor Baseline status certifies that your font includes the necessary face, axis or glyphs.