"."/> ".">

Home  >  Article  >  Web Front-end  >  What is the default font size of html5

What is the default font size of html5

WBOY
WBOYOriginal
2022-04-28 13:41:196594browse

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: "".

What is the default font size of html5

The operating environment of this article: Windows 10 system, html5 version, Dell G3 computer.

What is the default font size of html5

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:

What is the default font size of html5

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!

Statement:
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