javascripthtmlcssfontsaccessibility

Font style doesn't change in my website with the Chrome setting?


If I change the default display font settings in Chrome (Settings > Appearance > Customise fonts) to anything different but default. My webpage does show the change in font.

How it should look like Default/Changed (Times New Roman/Cascadia Code):

Example of a font change on Wikipedia

The font of the page does not change despite changed settings for the font.


Solution

  • The font of a webpage is determined by the CSS styles defined in the HTML code of the page. Changing the default font settings in your browser only affects the font used for the UI elements of the browser and not for the webpages.

    To change the font of a webpage, you need to update the CSS styles for that page to use the desired font. This can be done by adding a font-family property to the CSS styles for the elements you want to change the font for.