Font Properties
Fonts are one of the most basic things designers want to set with CSS. Is the text italic? Is it bold? What typeface and size are used? CSS provides properties to set all these basic characteristics of text. In particular, you can set these properties:
font-familyThis is a list of font names, separated by commas, in order of preference. The last name in the list should always be one of the generic names:
serif,sans-serif,monospace,cursive, orfantasy. Multiword names like “Times New Roman” should be enclosed in quotes.font-styleThe value
italicindicates that an italic version of the font should be used if one is available. The valueobliquesuggests that the text should be algorithmically slanted, as opposed to using a specially designed italic font. The default isnormal(no italicizing or slanting). An element can also be set toinheritthefont-styleof the parent element.font-sizeThis is the size of the font. This should be specified as one of the values
xx-small,x-small,small,medium,large,x-large, orxx-large. Alternately, it can be given as a percentage of thefont-sizeof the parent element. It can also be specified as a length like0.2cmor12pt, but this should only be done for print media.font-variantIf this property is set to
small-caps, then lowercase text is rendered in smaller capitals like this instead of normal lowercase letters.font-weightThis property determines how bold or light the text is. It’s generally specified as one of the keywords ...