CSS - Cascading Style Sheets (Page 4)
Font property. How many times have you changed the font style, font family, font weight etc. Font is an important attribute if you are using text in your html document which is quite obvious unless you are using images to show the all the content in your page.
| property | use | values | eg., |
|---|---|---|---|
| font | overall all the properties related to font can be placed using font |
|
font: italic smallcaps oblique 800 14px courier |
| font-family | you can say in which font the text has to be shown. The list is prioritized list, if the first font is available the it is shown in that font. If the font is not available on the system, it will take the second font till the last font given. If none of the fonts is present in the system, it is displayed in the browser default font. | font-family | font-family: "Times New Roman", courier, "sans serif" |
| font-size | it can displayed as percentage or using xxsmall etc | font-size: 9px; or font-size: 90%; or font-size: smaller;
|
|
| font-stretch | condenses or expands the current font family | font-stretch: narrower; | |
| font-style | font-style: italic | ||
| font-variant | displays text in a small font or normal font | font-variant: small-caps | |
| font-weight | sets the weight of the font. higher the font weight it show boldly | font-weight: bold |





