--- id: 5ef9b03c81a63668521804d8 title: Step 36 challengeType: 0 dashedName: step-36 --- # --description-- L'elemento `input` ti permette di raccogliere dati da un modulo web in vari modi. Come gli elementi `img`, gli elementi `input` sono self-closing e non necessitano di tag di chiusura. Annida un elemento `input` nell'elemento `form`. # --hints-- L'elemento `form` dovrebbe avere un tag di apertura e di chiusura nell'ordine corretto. Potrebbero mancare uno o entrambi i tag richiesti, o essere nell'ordine sbagliato. ```js const noSpaces = code.replace(/\s/g, ''); assert( document.querySelector('form') && code.match(/<\/form>/g) && noSpaces.indexOf('') ); ``` Il tag di apertura dell'elemento `form` dovrebbe avere solo un attributo `action`. Rimuovi qualsiasi altra cosa dal suo interno. ```js assert([...document.querySelector('form').attributes].length < 2); ``` Dovresti creare un elemento `input`. Controlla la sintassi. ```js assert(document.querySelector('input')); ``` L'elemento `input` dovrebbe avere un tag di apertura, ma non un tag di chiusura. ```js assert(document.querySelector('input') && !code.match(/<\/input\>/g)); ``` L'elemento `input` dovrebbe essere annidato all'interno dell'elemento `form`. ```js assert(document.querySelector('form > input')); ``` L'elemento `form` dovrebbe contenere solo l'elemento `input`. Rimuovi qualsiasi elemento HTML o testo tra i tag dell'elemento `form`. ```js assert( $('form')[0].children.length === 1 && $('form')[0].innerText.trim().length === 0 ); ``` # --seed-- ## --seed-contents-- ```html

CatPhotoApp

Cat Photos

Click here to view more cat photos.

A cute orange cat lying on its back.

Cat Lists

Things cats love:

  • cat nip
  • laser pointers
  • lasagna
A slice of lasagna on a plate.
Cats love lasagna.

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
Five cats looking around a field.
Cats hate other cats.

Cat Form

--fcc-editable-region--
--fcc-editable-region--
```