How to set text size in html

藏色散人
Release: 2023-01-05 16:11:59
Original
34384 people have browsed it

html Method to set text size: 1. Set the text size by adding px value after font-size; 2. Inherit the font size of the parent element through inherit; 3. Set the text size by a fixed value. Such as "xx-smal".

How to set text size in html

The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.

Method:

The first way: add px value after font-size

How to set text size in html

As shown in the picture , the larger the px, the larger the font

How to set text size in html

The second type: inherit, inherit the font size of the parent element, for example, the parent element is 10px, then the child element is also 10px

How to set text size in html

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

xx-small, x-small, small, medium, large , x-large, xx-large

How to set text size in html

##The fourth type: smaller and larger

These two are relative to the size of the parent element

How to set text size in html

The fifth form: percentage form

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

How to set text size in html

[Recommended learning:

css video tutorial]

The above is the detailed content of How to set text size in html. 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