CSS - font-kerning Property



The font-kerning property provided by CSS is useful in determining the way specific pairs of letters are spaced.

Possible Values

  • auto: Browser decides whether font kerning should be applied or not.

  • normal: Information of font kerning stored in the font must be used.

  • none: Information of font kerning stored in the font is disabled.

Applies to

All the HTML elements.

DOM Syntax

object.style.fontKerning = "normal";

CSS font-kerning - Basic Example

Here is an example:

<html>
<head>
<style>
    div {
        font-size: 2rem;
        font-family: serif;
    }
    #nokern {
        font-kerning: none;
    }
    #kern {
        font-kerning: normal;
    }
    #auto {
        font-kerning: auto;
    }
</style>
</head>
<body>
    <h2>Font kerning</h2>
    <div id="kern">AV</div>
    <div id="nokern">AV</div>
    <div id="auto">AV</div>
</body>
</html>
Advertisements