Validation in forms

Report a typo

The HTML form below needs some improvements. Add relevant attributes in the form so that the below conditions are fulfilled:

  • The response of the form is displayed on the new page or a new window when the form is submitted.
  • Do not validate the form responses so that the user can type anything in the form elements.
Write HTML and CSS code
<!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>Example of HTML Forms</title>
</head>
<body>
<form action="/action_page.php" >
<label for="first_name">First name:</label>
<input type="text" id="first_name" name="second_name" /><br />
<label for="second_name">Second name:</label>
<input type="text" id="second_name" name="second_name" /><br />
<label for="email">Email:</label>
<input type="text" id="email" name="email" /><br />
<input type="submit" />
</form>
</body>
</html>

Completed 1 of 3
Add an attribute such that the form response is displayed in a new window.
Do not validate the form responses.
___

Create a free account to access the full topic