About 10,500 results
Open links in new tab
  1. HTML DOM Style font Property - W3Schools

    With this property, you can set/return the following (in this order): The font-size and font-family are required. If one of the other values are missing, the default values will be inserted, if any. The …

  2. How to change font inside a javascript code - Stack Overflow

    Oct 14, 2017 · Don't reload the page at every click, but change the quote within the current page without navigating. To dynamically set the font, you could reserve a few CSS classes to …

  3. How to change font style using drop-down list in JavaScript

    Jul 15, 2025 · To change or set a font style for certain text, the fontFamily CSS property needs to be changed. The fontFamily property sets or returns a list of font-family names for text in an …

  4. How to set the font family for text with JavaScript?

    In this tutorial, we learned how to set the font family for text with JavaScript. We have seen two ways to set the font family using the style.fontFamily property and using the style.setProperty …

  5. How to Change Font in Javascript? A Simple Guide - WordSCR

    Apr 12, 2025 · This comprehensive guide delves into the intricacies of changing fonts in JavaScript, exploring various techniques and best practices to ensure your web applications …

  6. How to Change Font Family of HTML Element in JavaScript?

    How to Change Font Size of HTML Element in JavaScript? How to Change Font Family of HTML Element in JavaScript? How to Change Font Weight of HTML Element in JavaScript? How to …

  7. Change Font Style in JavaScript - Step-by-Step Guide - CodePal

    Learn how to change the font style of an element in JavaScript with this step-by-step guide. Understand the usage of the changeFontStyle function and how to apply different font styles to …

  8. How to Change Font Sizes with JavaScript - thesitewizard.com

    Apr 22, 2024 · Let's say that you want to change the font size of an element assigned to a variable "x". The JavaScript code for this is essentially: Replace "150%" with the actual font …

  9. Importing and Using Fonts With JavaScript - Testsuite

    Jul 29, 2023 · First, we create the element. We can use document.createElement('link') to create the <link> element we talked about earlier. Next we need to add a few attributes to specify the …

  10. HTML DOM Style fontFamily Property - W3Schools

    The fontFamily property sets or returns a list of font-family names and/or generic-family names for text in an element. The browser will use the first value it recognizes.