How to Increase Button Size in HTML Without CSS ? Last Updated : 10 Jul, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report To increase the button size in HTML without CSS, one can use JQuery and JavaScript language. In this article, we will explore both of these approaches with complete implementation in terms of examples and outputs. Table of Content Using jQueryUsing JavaScriptUsing jQueryIn this approach, we are using jQuery to dynamically adjust the width and height of the button based on user input from the number field, allowing the button size to change in real time without using any CSS or style properties.Syntax:$(function(){ // jQuery Method});Example: To demonstrate increasing button size in html without CSS using jQuery. HTML <!DOCTYPE html> <html> <head> <title>Example 2</title> <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script> <style> body { text-align: center; margin: 50px; } </style> </head> <body> <h1 style="color: green;">GeeksforGeeks</h1> <h3>Using jQuery</h3> <div> <label for="sizeInput">Enter size:</label> <input type="number" id="sizeInput" min="10" max="200" step="5" value="50"> </div> <div> <br /> <button id="changeSizeButton">Change Size</button> </div> <script> $(document).ready(function () { $('#sizeInput').on('input', function () { var newSize = $(this).val(); $('#changeSizeButton').width(newSize).height(newSize); }); }); </script> </body> </html> Output:Using JavaScriptIn this approach, we are using JavaScript to dynamically increase the button size without using CSS. The increaseFn() function, is triggered by the button click, retrieves the current width and height of the button and increments them by 20 pixels and 10 pixels.Syntax:<script><!-- javascript body --></script>Example: The below example uses JavaScript to increase button size in html without CSS. HTML <!DOCTYPE html> <html> <head> <title>Example 2</title> </head> <body> <h1 style="color: green;">GeeksforGeeks</h1> <h3>Using JavaScript</h3> <button type="button" id="myButton" onclick="increaseFn()">Click to Increase Size</button> <script> function increaseFn() { var btn = document.getElementById("myButton"); var currwidth = btn.clientWidth; var currheight = btn.clientHeight; btn.style.width = (currwidth + 20) + "px"; btn.style.height = (currheight + 10) + "px"; } </script> </body> </html> Output: Comment More infoAdvertise with us Next Article How to Add Shadow to Button in CSS ? G gauravggeeksforgeeks Follow Improve Article Tags : HTML HTML-Questions Similar Reads How to Change Button Size in HTML? To change the size of a button in HTML, there are several methods such as using the style attribute, external CSS, or adjusting the padding and font size. Modifying the buttonâs size enhances both the visual design and the user experience of a website.Here are three approaches to changing the size o 2 min read How to add icons in the button in HTML ? Adding icons in buttons in HTML involves including visual symbols or images within buttons to enhance their appearance and usability. This can be done using icon libraries like Font Awesome, Bootstrap Icons, or Material Icons, or by inserting images directly with <img> tags for visual cues.Add 3 min read How to Use Images as Buttons in HTML? Images can work like buttons to make a website more interactive and visually appealing. Over 70% of modern websites include image-based elements to enhance user experience. This article shows different ways to turn images into clickable buttons using simple HTML.1. Using the img Tag Inside the Butto 2 min read How to Add Button Inside an Input Field in HTML ? Integrating a button inside an input box is a common design pattern in web development, often seen in search bars, where a âsearchâ button sits within the text input field, or in password fields that include a âshow/hideâ toggle. This UI element enhances user experience by offering a clear, interact 3 min read How to Add Shadow to Button in CSS ? This article will show you how to add shadow to a button using CSS. Button shadow can enhance its visual appeal and make it stand out on your webpage. This article will cover various approaches to adding shadow to a button using CSS. Table of Content Add Shadow on button using box-shadow PropertyAdd 3 min read How to Fix Button Position in CSS? Position of elements on a webpage allows us to place elements in any particular position we want. The button is an interactive element that requires a specific placement for better usability. We can place buttons using several Position methods, in CSS each serving different purposes.Below are some p 3 min read Like