I've been working in HTML/CSS for years, but I'd like to clarify something about setting font sizes. What is the best format to set your font?
Typically, i've been setting with a font-size in a percentage, and then using em to change it up or down from there.
Is this the most standard way to do it? I've seen fonts declared in pixels, points, with relative keywords like "larger" or "smaller" I've seen it set as percentages, etc.
So what's the most standard? Is the most standard the best? any research to back it up?
Thanks,
The font-size-adjust property gives you better control of the font size when the first selected font is not available. When a font is not available, the browser uses the second specified font. This could result in a big change for the font size. To prevent this, use the font-size-adjust property.
In HTML, you can change the size of text with the <font> tag using the size attribute. The size attribute specifies how large a font will be displayed in either relative or absolute terms. Close the <font> tag with </font> to return to a normal text size.
The default is 16px. If you create an HTML file with any text in it, open it in Chrome, you can check the computed styles.
They're all standard. Use what works for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With