HTML CSS examples for CSS Property:font-variant
This font-variant CSS property sets the variation of the font family.
The following table summarizes the font-variant Property.
Item | Value |
---|---|
Default value: | normal |
Applies to: | All elements |
Inherited: | Yes |
Animatable: | No. |
The syntax of the property is as follows:
font-variant: normal | small-caps | initial | inherit
The following table describes the values of this property.
Value | Description |
---|---|
normal | Set a normal font face. |
small-caps | Set a font that is labeled as a small-caps font. |
initial | Sets this property to its default value. |
inherit | take the value of its parent element font-variant property. |
The example below shows the font-variant property.
<!DOCTYPE html> <html lang="en"> <head> <title>Example of CSS font-variant property</title> <style type="text/css"> p {<!-- ww w.j a va 2 s. co m--> font-variant: small-caps; } </style> </head> <body> <p>This is a paragraph.</p> </body> </html>