CSS font-stretch property
The font-stretch property in CSS allows us to select a normal, expanded, or condensed face from the font's family. This property sets the text wider or narrower compare to the default width of the font. It will not work on any font but only works on the font-family that has a width-variant face.
This CSS property only works for the fonts with additional faces like expanded and condensed faces; otherwise, it will be affectless for the fonts that don't have condensed or expanded faces.
The nine keyword values for choosing the width of the font-face are given in the following syntax.
The property values of this CSS property are tabulated as follows:
||This is the default value, which does not stretch any font.
||It slightly condensed the text characters of the element. This value makes the text narrower than normal but not narrower than condensed.
||This value makes the text narrower than semi-condensed but not narrower than extra-condensed.
||This value makes the text narrower than condensed but not narrower than ultra-condensed.
||This value makes the text extremely narrowed.
||It slightly widened the text characters of the element. This value makes the text wider than normal but not wider than expanded.
||This value makes the text wider than semi-expanded but not wider than extra-expanded.
||This value makes the text wider than expanded but not wider than ultra-expanded.
||This value makes the text extremely wider.
Let's understand the above property values by using an example.
Test it Now