Home >Web Front-end >HTML Tutorial >Summary of font attribute in HTML
This article brings you a summary of the font attribute in HTML. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
font-color: Color
Hexadecimal (#ff1122)
Can be abbreviated as (#f12)
rgb(255,255,255 ) There is a comma
in the middle rgba(255,255,255,1) The last 1 is transparency
font-size:XXPX
XX% The percentage of the parent element
smaller Smaller than the parent element
Larger Larger than the parent element
Inherit the size of the parent element
font-famliy:SimSun,`Microsoft Yahei`,SimSun; Use in Chinese Double quotation marks, separate the two fonts with commas. If the first one is not available, use the latter font
font-weight:normal Normal 400
bold Bold to 700
Bolder ## italic italic
Oblique Lainga
Inherit Inherit the parent element
FONT-VARIANT: normal inherit Inherit the parent element
Recommended related articles:
How to write the code to replace or add the website background image in HTML? (Example)The above is the detailed content of Summary of font attribute in HTML. For more information, please follow other related articles on the PHP Chinese website!