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

1.1 KiB

id title challengeType dashedName
615f34948891834dd77655a6 Passo 3 0 step-3

--description--

Adicione um segundo elemento p com o texto Serving size 2/3 cup (55g).

--hints--

Você deve ter um segundo elemento p.

assert(document.querySelectorAll('p')?.length === 2);

O segundo elemento p deve estar dentro do elemento body.

assert(document.querySelectorAll('p')?.[1]?.parentElement?.localName === 'body');

O segundo elemento p deve vir após o elemento p já existente.

assert(document.querySelectorAll('p')?.[1]?.previousElementSibling?.localName === 'p');

O segundo elemento p deve ter o texto Serving size 2/3 cup (55g).

assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup (55g)');

--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>
    <p>8 servings per container</p>

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