Write HTML5 code with CSS as follows- a) To create form to accept name, age,email address from the user. b) Create a submit button to send the data. c) The heading of the form should have a background color and a different font style.
Your answer
Answers
Answer:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First Web Page</title>
<style>
h1{
background-color: black;
color: white;
width: 20%;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
</style>
</head>
<body>
<h1>Form</h1>
<div>
<form action="#">
<label for="Name">Name: </label>
<input type="text" placeholder="Enter your name">
<br>
<br>
<label for="Age">Age: </label>
<input type="date" placeholder="Enter your age">
<br>
<br>
<label for="Email">EmailL: </label>
<input type="email" placeholder="Enter your email">
<br>
<br>
<input type="submit">
</form>
</div>
</body>
</html>