How to change font size using jQuery ? Last Updated : 23 Jul, 2025 Comments Improve Suggest changes 1 Likes Like Report 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. Syntax: $(selector).css(property) 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. Example: HTML <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content= "width=device-width, initial-scale=1.0"> <!-- Including jQuery --> <script src=" https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> </head> <body> <center> <h1 style="color: green;"> GeeksforGeeks </h1> <h3> How to change font size using jQuery? </h3> <div id="content">Welcome to GeeksforGeeks</div> <br> <button>Change font size</button> </center> <script> $(document).ready(function() { $('button').click(function() { $("#content").css("fontSize", "32px"); }); }); </script> </body> </html> Output: Create Quiz Comment V vkash8574 Follow 1 Improve V vkash8574 Follow 1 Improve Article Tags : JQuery jQuery-Methods HTML-Questions jQuery-Questions Explore jQuery Tutorial 7 min read Getting Started with jQuery 4 min read jQuery Introduction 7 min read jQuery Syntax 2 min read jQuery CDN 4 min read jQuery SelectorsJQuery Selectors 5 min read jQuery * Selector 1 min read jQuery #id Selector 1 min read jQuery .class Selector 1 min read jQuery EventsjQuery Events 4 min read jQuery bind() Method 2 min read jQuery blur() Method 1 min read jQuery change() Method 2 min read jQuery EffectsjQuery animate() Method 2 min read jQuery clearQueue() Method 2 min read jQuery delay() Method 2 min read jQuery HTML/CSSjQuery addClass() Method 2 min read jQuery after() Method 1 min read jQuery append() Method 2 min read jQuery TraversingjQuery | Traversing 4 min read jQuery add() method 1 min read jQuery addBack() Method 2 min read Like