Files
freeCodeCamp/curriculum/challenges/english/01-responsive-web-design/css-nutrition-label/step-002.md
Nicholas Carrigan (he/him) 0d33dff597 feat: nutrition label (#43852)
* feat: initial infra

* feat: break down steps

* feat: tests 1-30

* feat: tests 31 to end

* chore: apply gikf's review suggestions

Co-authored-by: Krzysztof <60067306+gikf@users.noreply.github.com>

* feat: actually testing things helps

* chore: apply review suggestions

Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com>

* chore: take the part, put it in a step

* chore: apply shaun's review suggestions

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

* chore: missed one

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

* chore: clarify verbiage

Co-authored-by: Krzysztof <60067306+gikf@users.noreply.github.com>
Co-authored-by: Sem Bauke <46919888+Sembauke@users.noreply.github.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
2021-11-03 09:13:47 +01:00

1019 B

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

--description--

Below your h1 element, add a p element with the text 8 servings per container.

--hints--

You should add a new p element.

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

Your p element should be within your body element.

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

Your p element should come after your h1 element.

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

Your p element should have the text 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--