--- id: bad87fee1348bd9aede08830 title: Create a Form Element challengeType: 0 videoUrl: 'https://scrimba.com/p/pVMPUv/cmQ3Kfa' --- ## Description
You can build web forms that actually submit data to a server using nothing more than pure HTML. You can do this by specifying an action on your form element. For example: <form action="/url-where-you-want-to-submit-form-data"></form>
## Instructions
Nest your text field inside a form element, and add the action="/submit-cat-photo" attribute to the form element.
## Tests
```yml tests: - text: Nest your text input element within a form element. testString: 'assert($("form") && $("form").children("input") && $("form").children("input").length > 0, "Nest your text input element within a form element.");' - text: Make sure your form has an action attribute which is set to /submit-cat-photo testString: 'assert($("form").attr("action") === "/submit-cat-photo", "Make sure your form has an action attribute which is set to /submit-cat-photo");' - text: Make sure your form element has well-formed open and close tags. testString: 'assert(code.match(/<\/form>/g) && code.match(/
/g) && code.match(/<\/form>/g).length === code.match(//g).length, "Make sure your form element has well-formed open and close tags.");' ```
## Challenge Seed
```html

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
```
## Solution
```js // solution required ```