In HTML5, the default font size is determined by different browsers. The default font size of most browsers is 16px; you can use the style and "font-size" attributes to set the font size. The syntax is: "
".
The operating environment of this article: Windows 10 system, html5 version, Dell G3 computer.
The default font size of most browsers is 16px. You can set the CSS font-size to change the font size.
<style> html,body{ font-size: 16px; } </style>
You can also set font-size:62.5% so that 1rem = 10px to agree on the font size.
For IE browser font calculation floating point number is not accurate, so it can be set to font-size:63%.
The example is as follows:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <p style="font-size:14px;">px</p> <p>px</p> </body> </html>
Output result:
Recommended tutorial: "html video tutorial"
The above is the detailed content of What is the default font size of html5. For more information, please follow other related articles on the PHP Chinese website!