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

1.2 KiB

id title challengeType dashedName
5f344fbc22624a2976425065 Step 9 0 step-9

--description--

Crea un elemento h2 con il testo Coffee all'interno dell'elemento section.

--hints--

Dovresti avere un tag di apertura <h2>.

assert(code.match(/<h2\s*>/i));

Dovresti avere un tag di chiusura </h2>.

assert(code.match(/<\/h2\s*>/i));

Non dovresti cambiare l'elemento section esistente. Assicurati di non aver eliminato il tag di chiusura.

assert($('section').length === 1);

L'elemento h2 dovrebbe essere all'interno dell'elemento section.

const h2 = document.querySelector('h2');
assert(h2.parentElement.tagName === 'SECTION');

L'elemento h2 dovrebbe contenere il testo Coffee.

const h2 = document.querySelector('h2');
assert(h2.innerText === 'Coffee');

--seed--

--seed-contents--

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Cafe Menu</title>
  </head>
  <body>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
--fcc-editable-region--
      <section>
      </section>
--fcc-editable-region--
    </main>
  </body>
</html>