»
006. EM in H5
Regarding font size adaptation in H5, there are several measures of size: px, pt, em, rem
px (pixel): An absolute unit of length, which is a pixel. The higher the ppi, the smaller the size
pt (point): An absolute unit of length that corresponds to the size of the physical world, equal to 1/72 inch in 72dpi(dot point inch). 1pt=2x2px in 144dpi screen.
em: A commonly used unit in printing, representing the width of uppercase M in traditional printing processes and the current point count in modern technology. For example, for a 16px font, 1em represents 16px.
rem:root em. The relative value of the number of pixels represented by the original 1em based on HTML. For example, if the original 1em in HTML represents 16px, then 1.5rem represents 24px.
For Rem, it is necessary to define a default font size in CSS, which is 1em. Without defining a default font size, 1em is 16px:
html {
font-size: 16px;
}
Note: 1rem is defined in CSS of tag 'html'.
-- www.v-signon-com Learner Encouragement