0

I have seen this post What is the default font family in HTML and how can I check this?

However, I have a few more specific questions, for the following simple HTML code, when it is displayed in a browser, will the browser use system font, i.e., the fonts in /windows/fonts, to render the web page content?

According to https://granneman.com/webdev/coding/css/fonts-and-formatting/web-browser-font-defaults, different browser use different default font, which means when the page is displayed in different browsers, the content will indeed display differently, correct? Chrome on Windows uses Arial by default, but what if the local computer does not have this font installed, will the browser use a different font, or will it display blank?

<body>
  Stack Overflow 
</body>
dovod74538
  • 113
  • 2
  • 9

2 Answers2

1

System fonts are fonts installed on the user's system. If your web site does not choose a font to use, then that user's system font will be used. Different systems have different fonts. System fonts on Windows may not be the same as fonts on Macs or Linux or BSD. Browsers do not have fonts themselves. It is not up to the browser to decide what those system fonts are.

Rob
  • 14,746
  • 28
  • 47
  • 65
-2

The default fonts in all browsers are Helvetica Neue, Helvetica, Arial, and sans-serif. All computer systems have these by default, pre-installed with the operating system. It's a standard. They're there. Unless a user has deleted them everyone has them. Therefore any of those will display.

If the user does not have the font the web page code instructs to be used their computer system will use whatever their default font is set to. It will not display a blank page.

To use a specific font: https://www.tutorialspoint.com/html/html_fonts.htm#:~:text=You%20can%20use%20a%20<basefont,use%20the%20tag.

That will work as long as the user has that font installed as the demonstrations on that page show.

To use a custom font: How do I install a custom font on an HTML site

If you're not happy with these links this information is readily available on many different sites and in a ton of different articles that can be found by searching for it.

abcd
  • 1
  • 3