คุณสมบัติ font-variant
เพื่อกำหนด font variant ให้ใช้คุณสมบัติ font-variant ตั้งค่าฟอนต์เป็น small-caps หรือ normal
ลองรันโค้ดต่อไปนี้เพื่อกำหนด font-variant เป็น small-caps ด้วย CSS:
<html>
<head>
</head>
<body>
<p style="font-variant:small-caps;">
This text will be rendered as small caps </p>
</body>
</html>
ค่าที่ใช้ได้:
- normal - ปกติ (ค่าเริ่มต้น)
- small-caps - ตัวพิมพ์เล็กกลายเป็นตัวพิมพ์ใหญ่ขนาดเล็ก
ใน CSS3 ยังมีค่าเพิ่มเติม เช่น all-small-caps, petite-caps, unicase, titling-caps