freeCodeCamp/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-buildin.../615f2d4150fe0d4cbd0f2628.md

1.0 KiB

id title challengeType dashedName
615f2d4150fe0d4cbd0f2628 Step 2 0 step-2

--description--

Sotto L'elemento h1, aggiungi un elemento p con il testo 8 servings per container.

--hints--

Dovresti aggiungere un nuovo elemento p.

assert.exists(document.querySelector('p'));

L'elemento p dovrebbe essere all'interno dell'elemento body.

assert(document.querySelector('p')?.parentElement?.localName === 'body');

L'elemento p dovrebbe trovarsi dopo l'elemento h1.

assert(document.querySelector('p')?.previousElementSibling?.localName === 'h1');

L'elemento p dovrebbe avere il testo 8 servings per container.

assert(document.querySelector('p')?.innerText === '8 servings per container');

--seed--

--seed-contents--

--fcc-editable-region--
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Nutrition Label</title>
  </head>
  <body>
    <h1>Nutrition Facts</h1>

  </body>
</html>
--fcc-editable-region--