61 lines
1.2 KiB
Markdown
61 lines
1.2 KiB
Markdown
---
|
|
id: 5f344fc1520b6719f2e35605
|
|
title: Step 8
|
|
challengeType: 0
|
|
dashedName: step-8
|
|
---
|
|
|
|
# --description--
|
|
|
|
Ci saranno due sezioni nel menù, una per il caffè e una per i dessert. Aggiungi un elemento `section` all'interno dell'elemento `main` in modo da avere uno spazio in cui inserire tutti i caffè disponibili.
|
|
|
|
# --hints--
|
|
|
|
Dovresti avere un tag di apertura `<section>`.
|
|
|
|
```js
|
|
assert(code.match(/<section\s*>/i));
|
|
```
|
|
|
|
Dovresti avere un tag di chiusura `</section>`.
|
|
|
|
```js
|
|
assert(code.match(/<\/section\s*>/i));
|
|
```
|
|
|
|
Non dovresti cambiare l'elemento `main` esistente. Assicurati di non aver eliminato il tag di chiusura.
|
|
|
|
```js
|
|
assert($('main').length === 1);
|
|
```
|
|
|
|
L'elemento `section` dovrebbe essere all'interno dell'elemento `main`.
|
|
|
|
```js
|
|
const main = document.querySelector('main');
|
|
const section = document.querySelector('section');
|
|
assert(section.parentElement === main);
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```html
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>Cafe Menu</title>
|
|
</head>
|
|
<body>
|
|
--fcc-editable-region--
|
|
<main>
|
|
<h1>CAMPER CAFE</h1>
|
|
<p>Est. 2020</p>
|
|
</main>
|
|
--fcc-editable-region--
|
|
</body>
|
|
</html>
|
|
```
|