Back to Freecodecamp

Step 4

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

latest1.1 KB
Original Source

--description--

There will be two sections on the menu, one for coffees and one for desserts. Add a section element within the main element so you have a place to put all the coffees available.

--hints--

You should have an opening <section> tag.

js
assert.match(code, /<section\s*>/i);

You should have a closing </section> tag.

js
assert.match(code, /<\/section\s*>/i);

You should not change your existing main element. Make sure you didn't delete the closing tag.

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

Your section element should be within your main element.

js
const main = document.querySelector('main');
const section = document.querySelector('section');
assert.strictEqual(section.parentElement, main);

--seed--

--seed-contents--

html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Cafe Menu</title>
  </head>
  <body>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
--fcc-editable-region--
      
--fcc-editable-region--
    </main>
  </body>
</html>