1.5 KiB
1.5 KiB
id | title | challengeType | dashedName |
---|---|---|---|
5f35e5c4321f818cdc4bed30 | Step 29 | 0 | 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>
.
assert(code.match(/<article>/i));
Dovresti avere un tag di chiusura </article>
.
assert(code.match(/<\/article>/i));
Non dovresti modificare l'elemento h2
esistente.
assert($('h2').length === 1);
L'elemento article
dovrebbe trovarsi dopo l'elemento h2
.
const article = $('article')[0];
assert(article.previousElementSibling.tagName === 'H2');
--seed--
--seed-contents--
<!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>
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;
}