CSS में फॉन्ट-वेरिएंट प्रॉपर्टी निम्नलिखित गुणों के लिए एक शॉर्टहैंड है:फॉन्ट-वेरिएंट-कैप्स, फॉन्ट-वेरिएंट-न्यूमेरिक, फॉन्ट-वेरिएंट-अल्टरनेट्स, फॉन्ट-वेरिएंट-लिगचर और फॉन्ट-वेरिएंट-ईस्ट-एशियन। इसका निम्न मान है -
font-variant: normal|small-caps|initial|inherit;
उदाहरण
आइए अब एक उदाहरण देखते हैं, जो फॉन्ट-वैरिएंट प्रॉपर्टी को लागू करता है -
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: linear-gradient(to right, yellow,orange,yellow,green,blue,indigo,violet);
}
.demo {
text-decoration: overline;
text-decoration-color: yellow;
font-variant:normal;
}
</style>
</head>
<body>
<h1>Examination Details</h1>
<p class="demo">Exam on 20th December.</p>
<p class="demo2">Exam begins at 9AM.</p>
</body>
</html> आउटपुट

उदाहरण
आइए अब एक और उदाहरण देखें -
<!DOCTYPE html>
<html>
<head>
<style>
.demo {
text-decoration: overline underline;
text-decoration-color: blue;
font-variant: small-caps;
}
</style>
</head>
<body>
<h1>Details</h1>
<p class="demo">Examination Center near ABC College.</p>
<p class="demo2">Exam begins at 9AM.</p>
</body>
</html> आउटपुट
