JavaScript – Change the Font Family of Div
To change the font family of a div using JavaScript, get reference to the element, and assign required font family value to the element.style.fontFamily
property.
Example
Conclusion
In this JavaScript Tutorial, we learned how to change the font family of a div using JavaScript.