Skip to main content

HTML Form Attributes — exercises and bug fixes

5 hands-on exercises and 5 find-the-bug challenges for the HTML Form Attributes lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.

Exercises(5)

  1. 1

    Target a new tab

    easy10 min

    Make the form submit into a new tab.

  2. 2

    Turn off autocomplete

    easy10 min

    Disable autocomplete on the form.

  3. 3

    Name the form

    easy10 min

    Give the form the name "signup".

  4. 4

    Set the encoding for uploads

    easy10 min

    Use multipart/form-data so files can upload.

  5. 5

    Skip built-in validation

    medium10 min

    Add novalidate to the form.

Find the bug(5)

  1. 1

    Fix the wrong target value

    easy8 min

    A new tab uses _blank, not new.

  2. 2

    Fix the missing encoding

    easy8 min

    File uploads need multipart/form-data.

  3. 3

    Fix autocomplete spelled wrong

    easy8 min

    The attribute is autocomplete.

  4. 4

    Fix the id used instead of name

    easy8 min

    The form should be named, not just given an id.

  5. 5

    Fix the validation flag

    easy8 min

    The attribute is novalidate, not no-validate.

Ready to write the code?

The editor, the automatic checks and the worked solutions open up with an account.

Open the workspace