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

68 lines
1.2 KiB
Markdown
Raw Normal View History

---
id: 60f027c87bc98f050395c139
title: Step 3
challengeType: 0
dashedName: 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`.
```js
assert(code.match(/<head\s*>/i));
```
Dovresti avere un tag di chiusura `head`.
```js
assert(code.match(/<\/head\s*>/i));
```
Dovresti avere un tag di apertura `body`.
```js
assert(code.match(/<body\s*>/i));
```
Dovresti avere un tag di chiusura `body`.
```js
assert(code.match(/<\/body\s*>/i));
```
Gli elementi `head` e `body` dovrebbero essere fratelli.
```js
assert(document.querySelector('head')?.nextElementSibling.localName === 'body');
```
L'elemento `head` dovrebbe essere all'interno dell'elemento `html`.
```js
assert([...document.querySelector('html')?.children].some(x => x?.localName === 'head'));
```
L'elemento `body` dovrebbe essere all'interno dell'elemento `html`.
```js
assert([...document.querySelector('html')?.children].some(x => x?.localName === 'body'));
```
# --seed--
## --seed-contents--
```html
--fcc-editable-region--
<!DOCTYPE html>
<html lang="en">
</html>
--fcc-editable-region--
```