Skip to content
Related Articles

Related Articles

How to move button in the same line with Checkbox and Textbox using JavaScript ?

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 16 Jul, 2020

The style “display” property in HTML DOM is used to set elements to “display” property. To set the button in the same line with other elements of the web page is done using the inline property.


  • It returns the “display” property.
  • It sets the “display” property. = inline;


<!DOCTYPE html>
    <!-- script to set display property -->
        function myGeeks() {
                .style.display = "inline";
    <div id="GFG">
        <input type="checkbox" checked> computer
        <input type="checkbox"> mobile
        <input type="text">
    <button onclick="myGeeks()">


  • Before click on the button:
  • After click on the button:

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!