freeCodeCamp/curriculum/challenges/italian/14-responsive-web-design-22/learn-html-forms-by-buildin.../60f027c87bc98f050395c139.md

1.2 KiB

id title challengeType dashedName
60f027c87bc98f050395c139 Step 3 0 step-3

--description--

Adesso, aggiungi i tag di apertura e chiusura degli elementi head e body all'interno dell'elemento html.

--hints--

Dovresti avere un tag di apertura head.

assert(code.match(/<head\s*>/i));

Dovresti avere un tag di chiusura head.

assert(code.match(/<\/head\s*>/i));

Dovresti avere un tag di apertura body.

assert(code.match(/<body\s*>/i));

Dovresti avere un tag di chiusura body.

assert(code.match(/<\/body\s*>/i));

Gli elementi head e body dovrebbero essere fratelli.

assert(document.querySelector('head')?.nextElementSibling.localName === 'body');

L'elemento head dovrebbe essere all'interno dell'elemento html.

assert([...document.querySelector('html')?.children].some(x => x?.localName === 'head'));

L'elemento body dovrebbe essere all'interno dell'elemento html.

assert([...document.querySelector('html')?.children].some(x => x?.localName === 'body'));

--seed--

--seed-contents--

--fcc-editable-region--
<!DOCTYPE html>
<html lang="en">

</html>
--fcc-editable-region--