Home > Web Front-end > HTML Tutorial > How to set html font size

How to set html font size

coldplay.xixi
Release: 2023-01-03 09:31:26
Original
16013 people have browsed it

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.

How to set html font size

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

How to set html font size

2. As shown in the figure, the larger the px, the larger the font size

How to set html 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

How to set html font size

4. The third type: several fixed values ​​(the default value is medium):

xx-small、x-small、small、medium、large、x-large、xx-large
Copy after login

How to set html font size

5. The fourth type: smaller and larger

These two are relative to the size of the parent element

How to set html font size

6. The fifth type: the form of percentage

The percentage is also adjusted based on the size of the parent element

How to set html font size

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template