The css font attribute is used to control the font, color, and size of text. There are many font attributes. In general, we use abbreviations to generalize multiple attributes into a css code. This greatly reduces code and optimizes css files.
The following six common font attributes are available:
Font-style: italic;
Font-weight: bold;
Font-size: 12px; (or 9pt reference CSS Manual)
Line-height: 150%;
Color: set the text color (note that it is not font-color) such as: color: red;
Font-family: "Lucida Grande", Verdana, Lucida, Arial, Helvetica,, sans-serif;
The above attributes can be summarized in a row of font attributes. Note that the color attribute needs to be defined separately.
Font: italic bold 12px/150% "Lucida Grande", Verdana, Lucida, Arial, Helvetica,, sans-serif ;}
In the above example, the font attribute is defined by a row, namely: font-style font-weight font-size line-height font-family, and the color setting text color needs to be defined separately.