close
About Us Services Blog Contact Us Learn

HTML Code Scramble Challenge - Problem 3

HTML Form Challenge

In this challenge, you have a piece of broken HTML code for a web form. The form is intended to collect:

  • Name, Email, and Password
  • Gender (via radio buttons)
  • Favorite Color (via a dropdown select)
  • Comments (via a textarea)

Your task is to fix all issues such as missing quotation marks, missing closing tags, and improper nesting. Once you believe your code is correct, paste your fixed code into the provided text area and click the Validate Answer button.

Broken HTML Form Code:

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>HTML Form Challenge</title>
</head>
<body>
  <h1>HTML Form Challenge</h1>
  <form action="submit_form.php" method="post">
    <label>Name:
      <input type="text" name=username>
    <label>Email:
      <input type=email name="email">
    <br>
    <label>Password:
      <input type="password" name="password">
    <br>
    <label>Gender:
      <input type="radio" name="gender" value="male">Male
      <input type="radio" name="gender" value="female">Female
    <br>
    <label>Favorite Color:
      <select name="color">
        <option value="red">Red
        <option value="blue">Blue</option>
        <option value="green">Green</option>
      </select>
    <br>
    <label>Comments:
      <textarea name="comments"></textarea
    <br>
    <input type="submit" value="Submit">
  </form>
</body>
</html>
  

Your Fixed Code:

No comments:

Post a Comment