Style input type button with CSS


The input type button can be a submit button or reset button. With CSS, we can style any button on a web page.

You can try to run the following code to style input type button:

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         input[type=button] {
            background-color: orange;
            border: none;
            text-decoration: none;
            color: white;
            padding: 20px 20px;
            margin: 20px 20px;
            cursor: pointer;
         }
      </style>
   </head>
   <body>
      <p>Fill the below form,</p>
      <form>
         <label for = "subject">Subject</label>
         <input type = "text" id = "subject" name = "sub"><br><br>
         <label for = "student">Student</label>
         <input type = "text" id = "student" name = "stu"><br>
         <input type = "button" value = "Button">
      </form>
   </body>
</html>

Updated on: 24-Jun-2020

4K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements