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

85 lines
1.5 KiB
Markdown

---
id: 5f35e5c4321f818cdc4bed30
title: Step 29
challengeType: 0
dashedName: step-29
---
# --description--
Sta prendendo un bell'aspetto. È ora di iniziare ad aggiungere alcune voci al menu. Aggiungi un elemento `article` vuoto sotto l'intestazione `Coffee`. Conterrà il gusto e il prezzo di ogni caffè offerto.
# --hints--
Dovresti avere un tag di apertura `<article>`.
```js
assert(code.match(/<article>/i));
```
Dovresti avere un tag di chiusura `</article>`.
```js
assert(code.match(/<\/article>/i));
```
Non dovresti modificare l'elemento `h2` esistente.
```js
assert($('h2').length === 1);
```
L'elemento `article` dovrebbe trovarsi dopo l'elemento `h2`.
```js
const article = $('article')[0];
assert(article.previousElementSibling.tagName === 'H2');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Cafe Menu</title>
<link href="styles.css" rel="stylesheet"/>
</head>
<body>
<div class="menu">
<main>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
<section>
--fcc-editable-region--
<h2>Coffee</h2>
--fcc-editable-region--
</section>
</main>
</div>
</body>
</html>
```
```css
body {
background-image: url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg);
}
h1, h2, p {
text-align: center;
}
.menu {
width: 80%;
background-color: burlywood;
margin-left: auto;
margin-right: auto;
}
```