Back to Freecodecamp

Step 1

curriculum/challenges/english/blocks/workshop-nutritional-label/615f2abbe7d18d49a1e0e1c8.md

latest796 B
Original Source

--description--

You've been provided with a basic HTML boilerplate.

Create an h1 element within your body element and give it the text Nutrition Facts.

--hints--

You should add a new h1 element.

js
assert.exists(document.querySelector('h1'));

Your h1 element should be within your body element.

js
assert.equal(document.querySelector('h1')?.parentElement?.localName, 'body');

Your h1 element should have the text Nutrition Facts.

js
assert.equal(document.querySelector('h1')?.innerText, 'Nutrition Facts');

--seed--

--seed-contents--

html
--fcc-editable-region--
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Nutrition Label</title>
</head>

<body>

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