Prev Demo
Select Option With Form
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title></title> <style> input[type=text],select { width: 20%; padding: 12px 20px; margin: 8px 0; display: inline-block; border: 1px solid green; border-radius: 4px; box-sizing: border-box; } input[type=submit] { width: 20%; background-color: green; color: white; padding: 14px 20px; margin: 8px 0; border: 2px solid red; border-radius: 25px; cursor: pointer; } input[type=submit]:hover { background-color: #45a049; } div { border-radius: 5px; background-color: pink; padding: 50px; } </style> </head> <body> <p><i>Forms with select option</i></p> <div> <form action="action_page.php"> First Name <input type="text" id="fname" name="firstname" placeholder="Firstname"> Lastname <input type="text" id="lname" name="lastname" placeholder="lastname"> State <select id="country" name="country"> <option value="australia">Australia</option> <option value="canada">Canada</option> <option value="usa">USA</option> </select> <input type="submit" value="Submit"> </form> </div> </body> </html>
Note: We DO NOT save your trial code in our database.
Output