Index.html file Code<!DOCTYPE html>
<html>
<head>
<title>Contact Form</title>
<style>
body
{
width:50%;
text-align:center;
margin:5em auto;
}
.class
{
background:grey;
}
.class input[type="text"],input[type="email"]
{
width:40%;
margin:1em;
height:20px;
padding:1em;
}
#msg
{
height:10em;
width:92%;
}
.class input[type="submit"],.class input[type="reset"]
{
border:1px solid grey;
width:44.2%;
padding:1em;
margin:1em;
}
</style>
</head>
<body>
<h1>Contact Form</h1>
<div class="class">
<form method="post">
<input type="text" name="name" placeholder="Name" />
<input type="text" name="Mobile" placeholder="Mobile" />
<input type="text" name="city" placeholder="City Name" />
<input type="email" name="email" placeholder="Email" />
<textarea placeholder="Write your message here" id="msg" ></textarea>
<input type="submit" name="submit" value="Submit" />
<input type="reset" name="reset" value="Reset" />
</form>
</div>
</body>
</html>
Output
Create a contact form using form handling || DWPD Sem 5 Practical 4
Comments
Post a Comment