Home>Article>Web Front-end> How to set html font size
How to set the font size of html: 1. Add the px value after [font-size]; 2. inherit the font size of the parent element; 3. Based on the size of the parent element, perform percentage adjust.
The operating environment of this tutorial: windows7 system, html5 version, DELL G3 computer.
How to set html font size:
1. The first method: add px value after font-size
2. As shown in the figure, the larger the px, the larger the font size
3. The second type: inherit, inherit the font size of the parent element, such as If the parent element is 10px, then the child element is also 10px
4. The third type: several fixed values (the default value is medium):
xx-small、x-small、small、medium、large、x-large、xx-large
5. The fourth type: smaller and larger
These two are relative to the size of the parent element
6. The fifth type: the form of percentage
The percentage is also adjusted based on the size of the parent element
Related learning recommendations :html video tutorial
The above is the detailed content of How to set html font size. For more information, please follow other related articles on the PHP Chinese website!