I know I can set Font on my webpage I make to
or I can set it to
But if I set it like this
what size is it going to make it?
I know font size="16" and font size="20" will display the font on your webpage you make in point size but when you use
font size="small" or font size="mediume" or font size="large"
What is it doing?
You should always specify your font sizes within a CSS rule. Every font size should have a unit value (px, em, rem, etc.) at the end of it.
This is a cool technique. The default pixel size in a browser is 16 pixels.
16*62.5 = 1000, or 10 pixels.
Why is this good? Because we can now specify our em values to match the intended font size of a given element. We can "think" in pixels, but use ems. Ems are great to use because they scale well across many different devices. Pixels will not provide proper scaling. With our body acting as a parent font size (needed by our child em-sized elements, we can size our elements without having to calculate the right em value. In the above example, 2em is now equal to 20px. If we romoved the 62.5%, 2em would equal twice that of the parent font size, 32px. Using the 62.5% technique, sizing with ems becomes easier.