ปุ่มประเภทอินพุตอาจเป็นปุ่มส่งหรือปุ่มรีเซ็ต ด้วย CSS เราสามารถกำหนดรูปแบบปุ่มต่างๆ บนหน้าเว็บได้
คุณสามารถลองเรียกใช้โค้ดต่อไปนี้เพื่อกำหนดรูปแบบปุ่มประเภทอินพุต:
ตัวอย่าง
<!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>