freeCodeCamp/curriculum/challenges/italian/14-responsive-web-design-22/learn-basic-css-by-building.../5f3313e74582ad9d063e3a38.md

62 lines
1.1 KiB
Markdown

---
id: 5f3313e74582ad9d063e3a38
title: Step 2
challengeType: 0
dashedName: step-2
---
# --description--
Aggiungi un elemento `head` all'interno dell'elemento `html`, in modo da poter aggiungere un elemento `title`. Il testo dell'elemento `title` dovrebbe essere `Cafe Menu`.
# --hints--
Dovresti avere un tag di apertura `<head>`.
```js
assert(code.match(/<head>/i));
```
Dovresti avere un tag di chiusura `</head>`.
```js
assert(code.match(/<head>/i));
```
Dovresti avere un tag di apertura `<title>`.
```js
assert(code.match(/<title>/i));
```
Dovresti avere un tag di chiusura `</title>`.
```js
assert(code.match(/<\/title>/i));
```
L'elemento `title` dovrebbe essere annidato nell'elemento `head`.
```js
assert(code.match(/<head>\s*<title>.*<\/title>\s*<\/head>/si));
```
L'elemento `title` dovrebbe avere il testo `Cafe Menu`. Controlla la tua ortografia.
```js
assert.match(document.querySelector('title')?.innerText, /Cafe Menu/i);
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
--fcc-editable-region--
--fcc-editable-region--
</html>
```