Back to Freecodecamp

Step 2

curriculum/challenges/english/blocks/workshop-cafe-menu/5f332a88dc25a0fd25c7687a.md

latest1.0 KB
Original Source

--description--

The name of the cafe is CAMPER CAFE. So, add an h1 element within your main element. Give it the name of the cafe in capitalized letters to make it stand out.

--hints--

You should have an opening <h1> tag.

js
assert.match(code, /<h1>/i);

You should have a closing </h1> tag.

js
assert.match(code, /<\/h1>/i);

You should not change your existing main element.

js
assert.lengthOf(document.querySelectorAll('main'), 1);

Your h1 element should be nested in your main element.

js
assert.equal(document.querySelector('h1')?.parentElement?.tagName, "MAIN");

Your h1 element should have the text CAMPER CAFE.

js
assert.equal(document.querySelector("h1")?.innerText.trim(), "CAMPER CAFE");

--seed--

--seed-contents--

html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Cafe Menu</title>
  </head>
  <body>
    <main>
--fcc-editable-region--
      
--fcc-editable-region--
    </main>
  </body>
</html>