How to change font size using jQuery ?
In this article, we will see how to change the font size of an element using jQuery. To change the font size of an element, we will use css() method.
The css() method is used to change the style property of the selected element.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.
Return value: It will return the value of the property for the selected element.
In the below example, we have created a div element that contains some text and also created a button element. When the user clicks on the button, the css() method is called and this method sets the font-size property value to 32px.